Repository navigation
Expand file tree
/
Copy pathcompose.dev.yaml
More file actions
80 lines (79 loc) · 2.06 KB
/
Copy pathcompose.dev.yaml
File metadata and controls
80 lines (79 loc) · 2.06 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
78
79
80
services:
web:
build:
context: ./web
target: development
volumes:
- ./web:/app
- node_modules_web:/app/node_modules
restart: unless-stopped
env_file:
- .env
ports:
- ${WEB_PORT:-80}:80
command: npm run development
networks:
- template
depends_on:
- api
api:
build:
context: ./api
target: development
restart: unless-stopped
env_file:
- .env
volumes:
- ./api:/app
- node_modules_api:/app/node_modules
ports:
- ${API_PORT:-3000}:3000
command: npm run development
networks:
- template
depends_on:
postgres:
condition: service_healthy
mail-worker:
build:
context: ./api
target: development
restart: unless-stopped
env_file:
- .env
volumes:
- ./api:/app
- node_modules_api:/app/node_modules
command: npm run mail:worker
networks:
- template
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:18-alpine
restart: unless-stopped
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql
- ./database.sql:/docker-entrypoint-initdb.d/init.sql:ro
ports:
- 127.0.0.1:${POSTGRES_PORT}:5432
networks:
- template
healthcheck:
test: ["CMD-SHELL", "pg_isready -h 127.0.0.1 -p 5432 -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 5
start_period: 5s
volumes:
node_modules_web:
node_modules_api:
postgres_data:
networks:
template:
name: template