updated nginx container, .conf file, added certbot container #2
@ -1,5 +1,45 @@
|
|||||||
version: '3.9'
|
version: '3.9'
|
||||||
|
networks:
|
||||||
|
proxy:
|
||||||
|
driver: bridge
|
||||||
|
default:
|
||||||
|
name: automatisch_network
|
||||||
|
enable_ipv6: ${ENABLE_IPV6}
|
||||||
|
ipam:
|
||||||
|
config:
|
||||||
|
- subnet: 2001:db8::/64
|
||||||
services:
|
services:
|
||||||
|
# for local https development using self-signed certs via openssl
|
||||||
|
# nginx:
|
||||||
|
# image: nginx:latest
|
||||||
|
# depends_on:
|
||||||
|
# - main
|
||||||
|
# ports:
|
||||||
|
# - "443:443"
|
||||||
|
# volumes:
|
||||||
|
# - ./https/certs/${SSL_SELF_SIGNED_CRT}:/etc/nginx/certs/${SSL_SELF_SIGNED_CRT}:ro
|
||||||
|
# - ./https/certs/${SSL_SELF_SIGNED_KEY}:/etc/nginx/certs/${SSL_SELF_SIGNED_KEY}:ro
|
||||||
|
# - ./https/nginx/automatisch_self_signed_nginx.conf:/etc/nginx/conf.d/
|
||||||
|
# for production using letsencrypt and certbot
|
||||||
|
nginx:
|
||||||
|
image: nginx:latest
|
||||||
|
depends_on:
|
||||||
|
- main
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- ./https/nginx/automatisch_letsencrypt_nginx.conf:/etc/nginx/conf.d/
|
||||||
|
- ./certbot/conf:/etc/letsencrypt
|
||||||
|
- ./certbot/www:/var/www/certbot
|
||||||
|
ports:
|
||||||
|
- ${PORT}:${PORT}
|
||||||
|
- 443:443
|
||||||
|
|
||||||
|
certbot:
|
||||||
|
image: certbot/certbot:latest
|
||||||
|
volumes:
|
||||||
|
- ./certbot/conf:/etc/letsencrypt
|
||||||
|
- ./certbot/www:/var/www/certbot
|
||||||
|
command: certonly --webroot -w /var/www/certbot --keep-until-expiring --email ${SSL_CERT_EMAIL} -d ${HOST} --agree-tos
|
||||||
main:
|
main:
|
||||||
build:
|
build:
|
||||||
context: ./docker
|
context: ./docker
|
||||||
|
Loading…
x
Reference in New Issue
Block a user