25 lines
644 B
YAML
25 lines
644 B
YAML
version: "3.8"
|
|
services:
|
|
nginx:
|
|
image: nginx:mainline-alpine
|
|
restart: always
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- NGINX_ENVSUBST_TEMPLATE_SUFFIX=.setup
|
|
volumes:
|
|
- ./nginx:/etc/nginx/templates
|
|
- /etc/certbot/conf:/etc/letsencrypt
|
|
- /etc/certbot/www:/var/www/certbot
|
|
ports:
|
|
- 80:80
|
|
- 443:443
|
|
certbot:
|
|
container_name: certbot
|
|
image: certbot/certbot
|
|
depends_on:
|
|
- nginx
|
|
volumes:
|
|
- /etc/certbot/conf:/etc/letsencrypt
|
|
- /etc/certbot/www:/var/www/certbot
|
|
command: certonly --webroot -w /var/www/certbot --email ${SSL_EMAIL} -d ${DOMAIN} --agree-tos |