-
Notifications
You must be signed in to change notification settings - Fork 16
/
docker-compose.yml
55 lines (50 loc) · 1.13 KB
/
docker-compose.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
version: '3.8'
services:
nginx:
image: nginx:1.23.3-alpine
ports:
- '8090:80'
volumes:
- ./nginx_reverse_proxy/default_rp.conf:/etc/nginx/conf.d/default.conf
depends_on:
- frontend
- backend
networks:
- chatgpt-network
frontend:
build:
context: ./chatgpt_frontend
dockerfile: Dockerfile
depends_on:
- backend
networks:
- chatgpt-network
backend:
build:
context: ./chatgpt_backend
dockerfile: Dockerfile
depends_on:
- db
env_file:
- .envs/.env
command: >
bash -c "python manage.py create_superuser &&
python manage.py makemigrations &&
python manage.py migrate &&
python manage.py collectstatic --noinput --clear --verbosity 0 &&
gunicorn --bind 0.0.0.0:8090 chatgpt_backend.wsgi:application"
networks:
- chatgpt-network
db:
image: postgres:13.6
env_file:
- .envs/.env
volumes:
- postgres:/var/lib/postgresql/data
networks:
- chatgpt-network
networks:
chatgpt-network:
driver: bridge
volumes:
postgres: