-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.prod.yml
executable file
·48 lines (43 loc) · 1.07 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
version: '3.6'
services:
postgres:
image: postgres
environment:
POSTGRES_DB: example_db
POSTGRES_PASSWORD: example_password
volumes:
- $DATA_VOLUME/var/lib/postgresql/data:/var/lib/postgresql/data
restart: always
ports:
- 5432:5432
django:
build:
context: ..
dockerfile: docker/django/Dockerfile.prod
command: sh /code/shell/wait-for.sh postgres:5432 -- gunicorn -b 0.0.0.0:8000 --workers=2 --access-logfile=- beans.wsgi
depends_on:
- postgres
restart: always
webpack:
build:
context: ..
dockerfile: docker/webpack/Dockerfile.prod
command: npm run build
volumes:
- $DATA_VOLUME/app:/code/app/dist
nginx:
build:
context: ..
dockerfile: docker/nginx/Dockerfile.prod
command: nginx
volumes:
- $DATA_VOLUME/etc/letsencrypt:/etc/letsencrypt
- $DATA_VOLUME/var/lib/letsencrypt:/var/lib/letsencrypt
- $DATA_VOLUME/app:/app
ports:
- 80:80
- 443:443
depends_on:
- django
- webpack
restart: always