Added docker configuration to serve and build documentation with livereload
This commit is contained in:
parent
c8b9e9506d
commit
01c8336988
3 changed files with 26 additions and 0 deletions
4
docs/Dockerfile
Normal file
4
docs/Dockerfile
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
FROM python:3.6-alpine
|
||||
|
||||
RUN pip install sphinx livereload
|
||||
WORKDIR /app/docs
|
||||
13
docs/serve.py
Normal file
13
docs/serve.py
Normal file
|
|
@ -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')
|
||||
Loading…
Add table
Add a link
Reference in a new issue