Add dockerfile

This commit is contained in:
Otto Winter 2018-06-09 09:58:58 +02:00
parent 4ab6e7053d
commit dc929e3186
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E
4 changed files with 35 additions and 17 deletions

5
.dockerignore Normal file
View File

@ -0,0 +1,5 @@
_doxyxml
_build
.python-version
.git

27
Dockerfile Normal file
View File

@ -0,0 +1,27 @@
FROM ubuntu:xenial
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
python3 \
python3-pip \
python3-setuptools \
python3-pygments \
git \
make \
doxygen \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/*
RUN pip3 install --no-cache-dir --no-binary :all: \
sphinx \
breathe
RUN curl -sL https://deb.nodesource.com/setup_7.x | bash - && \
apt-get install -y nodejs && \
npm install -g html-minifier
VOLUME /data/esphomedocs
VOLUME /data/esphomelib
EXPOSE 8000
WORKDIR /data/esphomedocs
CMD ["make", "webserver"]

View File

@ -9,12 +9,12 @@ SOURCEDIR = .
BUILDDIR = _build
ESPHOMELIB_PATH = ../esphomelib
.PHONY: html cleanhtml minifyhtml doxyg cleandoxyg copypdf fixdeploy releasedeploy help webserver Makefile
.PHONY: html cleanhtml minifyhtml doxyg cleandoxyg deploy help webserver Makefile
html: _doxyxml
$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
cleanhtml: cleandoxy
cleanhtml: cleandoxyg
rm -rf "$(BUILDDIR)/html/*"
minifyhtml: html
@ -28,21 +28,9 @@ cleandoxyg:
_doxyxml:
ESPHOMELIB_PATH=$(ESPHOMELIB_PATH) doxygen Doxygen
copypdf:
cp $(BUILDDIR)/latex/$(SPHINXPROJ).pdf $(BUILDDIR)/esphomelib.pdf
fixdeploy: copypdf cleanhtml doxyg html minifyhtml
deploy: cleanhtml doxyg html minifyhtml
touch "$(BUILDDIR)/html/.nojekyll"
echo "esphomelib.com" >"$(BUILDDIR)/html/CNAME"
cp $(BUILDDIR)/esphomelib.pdf $(BUILDDIR)/latex/$(SPHINXPROJ).pdf
cd "$(BUILDDIR)/html" && git add --all && git commit -m "Deploy to gh-pages"
@printf "Run \033[0;36mcd $(BUILDDIR)/html && git push origin gh-pages\033[0m to deploy\n"
releasedeploy: cleanhtml doxyg html minifyhtml
touch "$(BUILDDIR)/html/.nojekyll"
echo "esphomelib.com" >"$(BUILDDIR)/html/CNAME"
-yes '' | make latexpdf
cp $(BUILDDIR)/latex/$(SPHINXPROJ).pdf $(BUILDDIR)/html/_static/esphomelib.pdf
cd "$(BUILDDIR)/html" && git add --all && git commit -m "Deploy to gh-pages"
@printf "Run \033[0;36mcd $(BUILDDIR)/html && git push origin gh-pages\033[0m to deploy\n"

View File

@ -540,8 +540,6 @@ This list contains items that are technically already supported by other compone
Do you have other awesome automations or 2nd order components? Please feel free to add them to the
documentation for others to copy. See :doc:`Contributing <guides/contributing>`.
`Download the documentation as a PDF </_static/esphomelib.pdf>`__
.. toctree::
:hidden: