Files
personal_api/docker-compose.yml
2019-11-11 12:30:09 +01:00

29 lines
764 B
YAML

version: '3.7'
services:
app:
build: .
ports:
- '5001:80'
nginx:
container_name: nginx
image: nginx:latest
depends_on:
- app
ports:
- '80:80'
networks:
- my-network
volumes:
- ./data/nginx/app.conf:/etc/nginx/conf.d/default.conf
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
certbot:
image: certbot/certbot
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
networks:
my-network: