-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
45 lines (42 loc) · 1.23 KB
/
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
services:
back:
build: ./backend
ports:
- 5000:5000
environment:
- CHOKIDAR_USEPOLLING=true
volumes:
- ./backend/src:/app/src
env_file:
- database.env
- backend.env
healthcheck:
test: 'curl --fail --request POST --header ''Content-Type: application/json'' --url ''http://localhost:5000/'' --data ''{"query": "query { __typename }"}'''
interval: 2s
timeout: 260s
front:
build: ./frontend
environment:
- GRAPHQL_SCHEMA_URL=http://back:5000
ports:
- 5173:5173 # host_port:container_port
volumes:
- ./frontend/index.html:/app/index.html
- ./frontend/src:/app/src
- ./frontend/public:/app/public
- ./frontend/vite.config.ts:/app/vite.config.ts
- ./frontend/tsconfig.json:/app/tsconfig.json
depends_on:
back:
condition: service_healthy
db:
image: postgres
ports:
- 5432:5432
env_file:
- database.env
volumes:
- dbdata:/var/lib/postgresql/data
volumes:
dbdata:
driver: local