-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.local.yml
More file actions
53 lines (49 loc) · 1.18 KB
/
docker-compose.local.yml
File metadata and controls
53 lines (49 loc) · 1.18 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
# Local development compose — source-mounted for fast reload.
# Start with: ./dev.sh
# Access at localhost:${PORT:-4100}
name: underlay-local
services:
db:
image: postgres:17-alpine
environment:
POSTGRES_USER: underlay
POSTGRES_PASSWORD: underlay
POSTGRES_DB: underlay
command: >
postgres
-c shared_buffers=256MB
-c effective_cache_size=512MB
-c work_mem=8MB
-c maintenance_work_mem=64MB
-c max_connections=50
ports:
- '5433:5432'
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U underlay']
interval: 5s
timeout: 3s
retries: 5
app:
build:
context: .
dockerfile: Dockerfile
target: dev
ports:
- '${PORT:-4100}:${PORT:-4100}'
volumes:
- .:/app
- app_node_modules:/app/node_modules
env_file:
- .env.local
environment:
PORT: ${PORT:-4100}
DATABASE_URL: postgresql://underlay:underlay@db:5432/underlay
command: sh -c "pnpm db:migrate && pnpm db:seed && pnpm dev:app"
depends_on:
db:
condition: service_healthy
volumes:
pgdata:
app_node_modules: