-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
104 lines (98 loc) · 2.17 KB
/
docker-compose.dev.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
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
version: '3.8'
services:
backend:
build:
context: ./src/backend
target: development
ports:
- "3000:3000"
- "9229:9229"
volumes:
- ./src/backend:/app
- /app/node_modules
environment:
- NODE_ENV=development
- PORT=3000
- DEBUG=codequest:*
- API_PREFIX=/api/v1
- DB_HOST=postgres
- DB_PORT=5432
- REDIS_HOST=redis
- REDIS_PORT=6379
- LOG_LEVEL=debug
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 3
depends_on:
- postgres
- redis
networks:
- codequest_dev
web:
build:
context: ./src/web
dockerfile: Dockerfile
target: development
ports:
- "5173:5173"
volumes:
- ./src/web:/app
- /app/node_modules
environment:
- NODE_ENV=development
- VITE_API_URL=http://localhost:3000/api/v1
- VITE_WS_URL=ws://localhost:3000
- VITE_DEBUG=true
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5173/health"]
interval: 30s
timeout: 10s
retries: 3
depends_on:
- backend
networks:
- codequest_dev
postgres:
image: postgres:14-alpine
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=codequest
- POSTGRES_PASSWORD=development
- POSTGRES_DB=codequest
- POSTGRES_INITDB_ARGS=--auth-host=scram-sha-256
healthcheck:
test: ["CMD-SHELL", "pg_isready -U codequest"]
interval: 30s
timeout: 10s
retries: 3
networks:
- codequest_dev
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes --requirepass development
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 3
networks:
- codequest_dev
volumes:
postgres_data:
name: codequest_postgres_dev
redis_data:
name: codequest_redis_dev
networks:
codequest_dev:
driver: bridge
enable_ipv6: false
attachable: true