nginx: rework directory so that certbot works

single-dockerfile
Trammell Hudson 3 years ago
parent 64efdf9211
commit 357642d27e
  1. 7
      nginx/certbot-renew
  2. 8
      nginx/docker-compose.yaml
  3. 0
      nginx/nginx/includes/challenge.conf
  4. 0
      nginx/nginx/includes/options-ssl-nginx.conf
  5. 0
      nginx/nginx/includes/ssl-dhparams.pem
  6. 0
      nginx/nginx/nginx.conf
  7. 6
      nginx/nginx/templates/000-default.conf.template
  8. 6
      nginx/nginx/templates/cloud.conf.template
  9. 6
      nginx/nginx/templates/docs.conf.template
  10. 6
      nginx/nginx/templates/login.conf.template
  11. 6
      nginx/nginx/templates/social.conf.template

@ -1,4 +1,6 @@
#!/bin/bash
die() { echo >&2 "$@" ; exit 1 ; }
source ../env.production
source ./env.production
@ -7,12 +9,17 @@ rsa_key_size=2048
set -x
# move the old live directory away
rm -rf data/certbot/conf/live.old
mv data/certbot/conf/live data/certbot/conf/live.old
docker-compose run --rm certbot \
certonly --webroot -w /var/www/certbot \
$staging_arg \
--email "admin@$DOMAIN_NAME" \
--rsa-key-size $rsa_key_size \
--agree-tos \
--no-eff-email \
--force-renewal \
$domain_args \
|| die "unable to renew!"

@ -6,11 +6,11 @@ services:
- "80:80"
- "443:443"
volumes:
- ./data/nginx/nginx.conf:/etc/nginx/nginx.conf
#- ./data/nginx/sites-enabled:/etc/nginx/sites-enabled
- ./data/nginx/templates:/etc/nginx/templates
- ./data/certbot/conf:/etc/letsencrypt
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/templates:/etc/nginx/templates
- ./nginx/includes:/etc/nginx/includes
- ./data/certbot/www:/var/www/certbot
- ./data/certbot/conf:/etc/letsencrypt
env_file:
- ../env.production
- env.production

@ -32,9 +32,9 @@ server {
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/${DOMAIN_NAME}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/${DOMAIN_NAME}/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
include /etc/letsencrypt/challenge.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
include /etc/nginx/includes/options-ssl-nginx.conf;
include /etc/nginx/includes/challenge.conf;
ssl_dhparam /etc/nginx/includes/ssl-dhparams.pem;
}

@ -45,9 +45,9 @@ server {
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/${DOMAIN_NAME}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/${DOMAIN_NAME}/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
include /etc/letsencrypt/challenge.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
include /etc/nginx/includes/options-ssl-nginx.conf;
include /etc/nginx/includes/challenge.conf;
ssl_dhparam /etc/nginx/includes/ssl-dhparams.pem;
}

@ -52,9 +52,9 @@ server {
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/${DOMAIN_NAME}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/${DOMAIN_NAME}/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
include /etc/letsencrypt/challenge.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
include /etc/nginx/includes/options-ssl-nginx.conf;
include /etc/nginx/includes/challenge.conf;
ssl_dhparam /etc/nginx/includes/ssl-dhparams.pem;
}

@ -21,9 +21,9 @@ server {
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/${DOMAIN_NAME}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/${DOMAIN_NAME}/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
include /etc/letsencrypt/challenge.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
include /etc/nginx/includes/options-ssl-nginx.conf;
include /etc/nginx/includes/challenge.conf;
ssl_dhparam /etc/nginx/includes/ssl-dhparams.pem;
}

@ -20,9 +20,9 @@ server {
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/${DOMAIN_NAME}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/${DOMAIN_NAME}/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
include /etc/letsencrypt/challenge.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
include /etc/nginx/includes/options-ssl-nginx.conf;
include /etc/nginx/includes/challenge.conf;
ssl_dhparam /etc/nginx/includes/ssl-dhparams.pem;
}
Loading…
Cancel
Save