-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcompose.yaml
More file actions
77 lines (74 loc) · 1.63 KB
/
Copy pathcompose.yaml
File metadata and controls
77 lines (74 loc) · 1.63 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
services:
db:
image: postgres:latest
restart: always
environment:
POSTGRES_USER: ${PG_DB_ROOT_USERNAME}
PGUSER: ${PG_DB_ROOT_USERNAME}
POSTGRES_PASSWORD: ${PG_DB_ROOT_PASSWORD}
POSTGRES_DB: ${PG_DB_DATABASE}
ports:
- "5435:5432"
expose:
- "5435"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "$${PG_DB_DATABASE}"]
interval: 10s
timeout: 5s
retries: 5
server:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "8080:8080"
depends_on:
db:
condition: service_healthy
env_file:
- .env
environment:
- PG_DB_ROOT_USERNAME=${PG_DB_ROOT_USERNAME}
- PG_DB_ROOT_PASSWORD=${PG_DB_ROOT_PASSWORD}
- PG_DB_DATABASE=${PG_DB_DATABASE}
- PG_DB_PORT=${PG_DB_DOCKER_PORT}
- PG_DB_HOST=db
develop:
watch:
- path: ./backend
target: /app
action: rebuild
ignore:
- node_modules/
- action: rebuild
path: package.json
web:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "3000:3000"
depends_on:
- server
environment:
- GLOBAL_SERVER_URL=${GLOBAL_SERVER_URL}
env_file:
- .env
develop:
watch:
- action: sync
path: ./frontend
target: /app
ignore:
- node_modules/
- action: rebuild
path: package.json
redis:
image: redis:7.2.2
ports:
- 6379:6379
restart: unless-stopped
volumes:
postgres_data: