-
-
Save saladinjake/bf08f77578f33dc26fdd73389ade70f8 to your computer and use it in GitHub Desktop.
mkdocs in a Docker container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
server_name localhost; | |
location / { | |
proxy_pass http://localhost:8000; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:17.10 | |
MAINTAINER Chris Collins <[email protected]> | |
ENV PKGS python python-pip nginx runit | |
RUN apt-get update && \ | |
DEBIAN_FRONTEND=noninteractive apt-get install -y $PKGS | |
RUN pip install mkdocs | |
ADD default /etc/nginx/sites-enabled/default | |
RUN mkdir -p /etc/service/nginx | |
ADD nginx.run /etc/service/nginx/run | |
RUN chmod -R a+x /etc/service/nginx | |
RUN mkdir -p /etc/service/mkdocs | |
ADD mkdocs.run /etc/service/mkdocs/run | |
RUN chmod -R a+x /etc/service/mkdocs | |
EXPOSE 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd /mnt | |
mkdocs build --clean | |
exec mkdocs serve |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
exec /usr/sbin/nginx -c /etc/nginx/nginx.conf -g "daemon off;" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment