-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-dev.yml
More file actions
66 lines (66 loc) · 1.89 KB
/
docker-compose-dev.yml
File metadata and controls
66 lines (66 loc) · 1.89 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
name: HitAPI
services:
api-dev:
build:
context: .
dockerfile: apps/api/Dockerfile.dev
container_name: api-dev
restart: unless-stopped
env_file:
- ./apps/api/.env.development
environment:
- POSTGRES_HOST=postgresDB
- REDIS_HOST=redisCache
ports:
- '${PORT:-3001}:${PORT:-3001}'
depends_on:
postgresDB:
condition: service_healthy
redisCache:
condition: service_healthy
develop:
watch:
- action: rebuild
path: ./package.json
- action: rebuild
path: ./apps/api/package.json
- action: sync
path: ./apps/api/src
target: /app/apps/api/src
postgresDB:
image: postgres:18.3
container_name: postgres-db
restart: unless-stopped
env_file:
- ./apps/api/.env.development
ports:
- '${POSTGRES_PORT:-5432}:${POSTGRES_PORT:-5432}'
volumes:
- db-dev-data:/var/lib/postgresql/18/data
healthcheck:
test:
[
'CMD-SHELL',
'pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB',
]
interval: 10s
timeout: 5s
retries: 5
redisCache:
image: redis/redis-stack:7.4.0-v8
container_name: redis-cache
restart: unless-stopped
env_file:
- ./apps/api/.env.development
ports:
- '${REDIS_PORT:-6379}:${REDIS_PORT:-6379}'
volumes:
- cache-dev-data:/data
healthcheck:
test: ['CMD-SHELL', 'redis-cli ping']
interval: 10s
timeout: 5s
retries: 5
volumes:
db-dev-data:
cache-dev-data: