-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
61 lines (59 loc) · 1.18 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
version: '3.8'
services:
postgres:
image: postgres
expose:
- "5432"
volumes:
- postgres_data:/var/lib/postgresql/data
env_file:
- ./.env.prod
healthcheck:
test: pg_isready -U postgres
api:
platform: linux/amd64
build:
context: ./api
dockerfile: Dockerfile.prod
command: gunicorn api.wsgi:application --bind 0.0.0.0:8000
volumes:
- ./api/:/api/
ports:
- 8000:8000
env_file:
- ./api/api/.env.prod
depends_on:
- postgres
# web:
# build:
# context: ./web
# dockerfile: Dockerfile
# command : npm start
# volumes:
# - ./web/:/usr/src/web/
# ports:
# - "3000:3000"
nginx-api:
image: nginx
build:
context: ./
dockerfile: Dockerfile
restart: on-failure
# volumes:
# - ./nginx.prod.conf:/etc/nginx/conf.d/default.conf
# - static_volume:/home/api/api/staticfiles
ports:
- 80:80
depends_on:
- api
# nginx-web:
# build: ./nginx/web
# volumes:
# - static_volume:/home/api/api/staticfiles
# ports:
# - 80:80
# depends_on:
# - api
volumes:
postgres_data:
# static_volume: