-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.prod.yml
90 lines (85 loc) · 1.95 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
version: '3'
services:
app:
restart: always
image: ghcr.io/getpay-id/getpay-api:latest
depends_on:
- db
- redis
expose:
- 5000
env_file:
- .env
environment:
- MONGODB_HOST=db
- REDIS_HOST=redis
volumes:
- .:/space
- static_volume:/space/static
command: gunicorn app.main:app -k uvicorn.workers.UvicornWorker -b 0.0.0.0:5000 --access-logfile - --log-file - --log-level debug -t 120
db:
restart: always
image: bitnami/mongodb
env_file:
- .env
volumes:
- db-data:/bitnami/mongodb
expose:
- 27017
redis:
image: redis:alpine
restart: always
expose:
- 6379
volumes:
- redis-data:/data
q1_worker:
restart: always
image: ghcr.io/getpay-id/getpay-api:latest
env_file:
- .env
depends_on:
- redis
environment:
- MONGODB_HOST=db
- REDIS_HOST=redis
command: popol saq runworker --queue default
# NginX and LetsEncrypt setup reference can be found here:
# => https://testdriven.io/blog/dockerizing-django-with-postgres-gunicorn-and-nginx/
# => https://testdriven.io/blog/django-lets-encrypt/
nginx-proxy:
container_name: nginx-proxy
build: nginx
restart: always
ports:
- 443:443
- 80:80
volumes:
- static_volume:/space/static
- certs:/etc/nginx/certs
- html:/usr/share/nginx/html
- vhost:/etc/nginx/vhost.d
- /var/run/docker.sock:/tmp/docker.sock:ro
depends_on:
- app
nginx-proxy-letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
env_file:
- ./.env.proxy-companion
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- certs:/etc/nginx/certs
- html:/usr/share/nginx/html
- vhost:/etc/nginx/vhost.d
- acme:/etc/acme.sh
depends_on:
- nginx-proxy
volumes:
redis-data:
db-data:
static_volume:
media_volume:
certs:
html:
vhost:
acme: