-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
53 lines (50 loc) · 1.02 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
version: "3.8"
services:
web:
build: ./zeton_django
command: python manage.py runserver 0.0.0.0:8000
volumes:
- ./zeton_django/:/code
ports:
- 8000:8000
env_file:
- ./zeton_django/env_config/local.env
depends_on:
- db
- migration
networks:
- db
db:
image: postgres:16
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
networks:
- db
react-client:
build: ./zeton_react
volumes:
- ./zeton_react/:/app/
- /app/node_modules
ports:
- 3000:3000
environment:
REACT_APP_API_URL: http://localhost:8000
migration:
build: ./zeton_django
command: ["bash", "-c", "while !</dev/tcp/db/5432; do sleep 1; done; python zeton_django/manage.py migrate"]
volumes:
- .:/code
depends_on:
- db
networks:
- db
volumes:
postgres_data:
networks:
db: