31 lines
917 B
YAML
31 lines
917 B
YAML
version: '3.7'
|
|
services:
|
|
nginx:
|
|
container_name: nginx
|
|
image: nginx:latest
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ./data/nginx:/etc/nginx/conf.d
|
|
- ./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;'"
|
|
app:
|
|
build:
|
|
context: ./
|
|
dockerfile: Dockerfile
|
|
image: personal_api:0.0.1
|
|
container_name: personal_api
|
|
volumes:
|
|
- ./:/personal_api/
|
|
command: gunicorn -w 4 -k uvicorn.workers.UvicornWorker personal_api.main:app -b 0.0.0.0
|
|
ports:
|
|
- "8000:8000"
|