-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
69 lines (65 loc) · 1.65 KB
/
docker-compose.dev.yml
File metadata and controls
69 lines (65 loc) · 1.65 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
services:
# PostgreSQL Database
postgres:
image: postgres:16-alpine
container_name: roommate-db-dev
restart: unless-stopped
environment:
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
ports:
- '127.0.0.1:5432:5432' # do not expose all LAN
volumes:
- postgres_data_dev:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${DATABASE_USER}']
interval: 10s
timeout: 5s
retries: 5
networks:
- roommate-network
# Redis
redis:
image: redis:7-alpine
container_name: roommate-redis-dev
restart: unless-stopped
ports:
- '127.0.0.1:6379:6379'
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 10s
timeout: 5s
retries: 5
networks:
- roommate-network
# NestJS
app:
build:
context: .
dockerfile: ./docker/Dockerfile.dev
container_name: roommate-app-dev
restart: unless-stopped
ports:
- '0.0.0.0:3000:3000' # For RN dev
- '127.0.0.1:9229:9229' # DEBUG PORT
environment:
NODE_ENV: development
PORT: 3000
DATABASE_URL: ${DATABASE_URL}
APP_NAME: ${APP_NAME}
volumes:
- .:/usr/src/app # Sync your code changes || The container's /app is actually pointing to your local folder
- /usr/src/app/node_modules # keep container's node_modules
depends_on:
postgres:
condition: service_healthy
networks:
- roommate-network
command: npm run start:debug
volumes:
postgres_data_dev:
driver: local
networks:
roommate-network:
driver: bridge