-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.prod.yml
72 lines (66 loc) · 1.62 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
version: '3.8'
services:
nginx-proxy-letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
env_file:
- .env.prod.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
nginx-proxy:
container_name: nginx-proxy
build: nginx
restart: always
ports:
- 443:443
- 80:80
volumes:
- static_volume:/home/app/django/static_prod
- media_volume:/home/app/django/media
- certs:/etc/nginx/certs
- html:/usr/share/nginx/html
- vhost:/etc/nginx/vhost.d
- /var/run/docker.sock:/tmp/docker.sock:ro
depends_on:
- django
django:
build:
context: ./src
dockerfile: Dockerfile.prod
command: gunicorn lovelace.wsgi:application --bind 0.0.0.0:8000
volumes:
- static_volume:/home/app/django/static_prod
- media_volume:/home/app/django/media
expose:
- 8000
env_file:
- .env.prod
depends_on:
- db
- engine
db:
image: postgres:12.2
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file:
- .env.prod.db
engine:
image: projectlovelace/lovelace-engine
command: gunicorn --worker-tmp-dir /dev/shm --workers 1 --log-level debug --timeout 600 --preload --reload --bind 0.0.0.0:14714 engine.api:app
volumes:
- /var/run/docker.sock:/var/run/docker.sock
expose:
- 14714
volumes:
postgres_data:
static_volume:
media_volume:
certs:
html:
vhost:
acme: