Fixes docker file when using letsencrypt. Adds ps command to nginx image for start.sh to be able to run without errors (#1154)

This commit is contained in:
Delio Castillo 2017-05-12 09:23:22 -07:00 committed by Jannis Gebauer
parent 5fab2f4bf5
commit 89bc1212b3
2 changed files with 5 additions and 4 deletions

View File

@ -2,6 +2,9 @@ FROM nginx:latest
ADD nginx.conf /etc/nginx/nginx.conf ADD nginx.conf /etc/nginx/nginx.conf
{% if cookiecutter.use_lets_encrypt == 'y' and cookiecutter.use_docker == 'y' %} {% if cookiecutter.use_lets_encrypt == 'y' and cookiecutter.use_docker == 'y' %}
# installs the `ps` command in the nginx image
RUN apt-get update && apt-get install -y procps
ADD start.sh /start.sh ADD start.sh /start.sh
ADD nginx-secure.conf /etc/nginx/nginx-secure.conf ADD nginx-secure.conf /etc/nginx/nginx-secure.conf
ADD dhparams.pem /etc/ssl/private/dhparams.pem ADD dhparams.pem /etc/ssl/private/dhparams.pem

View File

@ -28,14 +28,12 @@ services:
- django - django
{% if cookiecutter.use_lets_encrypt == 'y' %} {% if cookiecutter.use_lets_encrypt == 'y' %}
- certbot - certbot
environment:
- MY_DOMAIN_NAME={{ cookiecutter.domain_name }}
{% endif %} {% endif %}
ports: ports:
- "0.0.0.0:80:80" - "0.0.0.0:80:80"
{% if cookiecutter.use_lets_encrypt == 'y' %} {% if cookiecutter.use_lets_encrypt == 'y' %}
environment:
- MY_DOMAIN_NAME={{ cookiecutter.domain_name }}
ports:
- "0.0.0.0:80:80"
- "0.0.0.0:443:443" - "0.0.0.0:443:443"
volumes: volumes:
- /etc/letsencrypt:/etc/letsencrypt - /etc/letsencrypt:/etc/letsencrypt