From dc929e3186f7777c8c220335c0fc6aefa16f4650 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Sat, 9 Jun 2018 09:58:58 +0200 Subject: [PATCH] Add dockerfile --- .dockerignore | 5 +++++ Dockerfile | 27 +++++++++++++++++++++++++++ Makefile | 18 +++--------------- esphomeyaml/index.rst | 2 -- 4 files changed, 35 insertions(+), 17 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..454e26cab --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +_doxyxml +_build + +.python-version +.git diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..33f0d8b8e --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/Makefile b/Makefile index 3bae1f19a..f54d4f5a1 100644 --- a/Makefile +++ b/Makefile @@ -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" diff --git a/esphomeyaml/index.rst b/esphomeyaml/index.rst index 7b0a82a28..9b64c8593 100644 --- a/esphomeyaml/index.rst +++ b/esphomeyaml/index.rst @@ -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 `. -`Download the documentation as a PDF `__ - .. toctree:: :hidden: