-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
50 lines (47 loc) · 1.19 KB
/
docker-compose.dev.yml
File metadata and controls
50 lines (47 loc) · 1.19 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
name: liblab
services:
postgres:
image: postgres:15
container_name: liblab-postgres
environment:
POSTGRES_DB: liblab
POSTGRES_USER: liblab
POSTGRES_PASSWORD: liblab_password
ports:
- '5432:5432'
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U liblab -d liblab']
interval: 10s
timeout: 5s
retries: 5
ai-app-dev:
build:
context: .
dockerfile: Dockerfile
target: base # Use the base stage for development (no build step)
ports:
- '3000:3000'
depends_on:
postgres:
condition: service_healthy
volumes:
# Mount source code for hot reloading
- .:/app
# Exclude node_modules and .next to use container's version
- /app/node_modules
- /app/.next
# Persist snapshots between container restarts
- snapshots_data:/app/snapshots
env_file:
- '.env'
environment:
- NODE_ENV=development
- DATABASE_URL=postgresql://liblab:liblab_password@postgres:5432/liblab
command: ['pnpm', 'run', 'dockerdev']
stdin_open: true
tty: true
volumes:
postgres_data:
snapshots_data: