-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
51 lines (46 loc) · 1.49 KB
/
docker-compose.prod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# This is a compose file for production
version: "3.8"
services:
game:
build:
dockerfile: Dockerfile.prod
# only use 1 worker due to eventlet's requirement.
command: gunicorn --log-file=- --worker-class eventlet -w 1 --bind 0.0.0.0:5000 manage:app
env_file:
- ./.env.prod
volumes:
- memes_dir:/home/app/images/
celery:
build:
dockerfile: Dockerfile.prod
command: /bin/sh -c "celery --app=captionthis worker --loglevel=DEBUG & celery --app=captionthis beat --loglevel=DEBUG & tail -f /dev/null"
env_file:
- ./.env.prod
memegen:
build:
dockerfile: Dockerfile.prod
command: gunicorn --log-file=- --worker-class sanic.worker.GunicornWorker -w 2 --bind 0.0.0.0:5000 app:app
env_file:
- ./.env.prod
volumes:
- memes_dir:/home/app/images/
nginx:
build:
target: production
ports:
- 443:443
volumes:
# Follow instructions from DigitalOcean deployment
- certbot-web:/var/www/html # For validation challengers
- certbot-etc:/etc/letsencrypt
- certbot-var:/var/lib/letsencrypt
- dhparam:/etc/ssl/certs
certbot:
image: certbot/certbot
volumes:
- certbot-etc:/etc/letsencrypt
- certbot-var:/var/lib/letsencrypt
- certbot-web:/var/www/html
depends_on:
- nginx
command: certonly --webroot --webroot-path=/var/www/html --email ppkhiemnguyen@gmail.com --agree-tos --no-eff-email --force-renewal -d captionthis.me -d www.captionthis.me