Added docker configuration to serve and build documentation with livereload

merge-requests/154/head
Eliot Berriot 2018-03-12 23:38:39 +01:00
rodzic c8b9e9506d
commit 01c8336988
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: DD6965E2476E5C27
3 zmienionych plików z 26 dodań i 0 usunięć

Wyświetl plik

@ -71,3 +71,12 @@ services:
- ./api/funkwhale_api/media:/protected/media
ports:
- "0.0.0.0:6001:6001"
docs:
build: docs
command: python serve.py
volumes:
- ".:/app/"
ports:
- '35730:35730'
- '8001:8001'

4
docs/Dockerfile 100644
Wyświetl plik

@ -0,0 +1,4 @@
FROM python:3.6-alpine
RUN pip install sphinx livereload
WORKDIR /app/docs

13
docs/serve.py 100644
Wyświetl plik

@ -0,0 +1,13 @@
#!/usr/bin/env python
from subprocess import call
# initial make
call(["python", "-m", "sphinx", ".", "/tmp/_build"])
from livereload import Server, shell
server = Server()
server.watch('.', shell('python -m sphinx . /tmp/_build'))
server.serve(
root='/tmp/_build/',
liveport=35730,
port=8001,
host='0.0.0.0')