-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
80 lines (77 loc) · 2.11 KB
/
docker-compose.dev.yml
File metadata and controls
80 lines (77 loc) · 2.11 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
70
71
72
73
74
75
76
77
78
79
80
services:
db:
image: postgres:16
restart: unless-stopped
environment:
POSTGRES_USER: fate
POSTGRES_PASSWORD: fate
POSTGRES_DB: fate
volumes:
- postgres-data-dev:/var/lib/postgresql/data
- ./db/schema.sql:/docker-entrypoint-initdb.d/schema.sql:ro
ports:
- '5432:5432'
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U fate -d fate']
interval: 5s
timeout: 5s
retries: 5
app:
build:
context: .
args:
SKIP_NPM_INSTALL: 'true'
restart: unless-stopped
working_dir: /app
environment:
DATABASE_URL: postgresql://fate:fate@db:5432/fate
NEXTAUTH_URL: http://localhost:3000
NEXTAUTH_SECRET: devsecret
GARAGE_ENDPOINT: ${GARAGE_ENDPOINT:-http://garage:3900}
GARAGE_REGION: ${GARAGE_REGION:-garage}
GARAGE_BUCKET: ${GARAGE_BUCKET:-fate-images}
GARAGE_ACCESS_KEY_ID: ${GARAGE_ACCESS_KEY_ID:-}
GARAGE_SECRET_ACCESS_KEY: ${GARAGE_SECRET_ACCESS_KEY:-}
NEXT_PUBLIC_P2P_CONNECTION_TYPE: SOCKET
ABLY_API_KEY: ${ABLY_API_KEY:-}
ports:
- '3000:3000'
depends_on:
db:
condition: service_healthy
garage:
condition: service_healthy
volumes:
- .:/app:cached
command: ['npm', 'run', 'dev', '--', '-H', '0.0.0.0', '-p', '3000']
healthcheck:
test:
[
'CMD',
'node',
'-e',
"fetch('http://localhost:3000').then(() => process.exit(0)).catch(() => process.exit(1))",
]
interval: 10s
timeout: 5s
retries: 5
garage:
image: dxflrs/garage:v2.1.0
restart: unless-stopped
command: ['/garage', '-c', '/garage.toml', 'server']
volumes:
- garage-data:/var/lib/garage
- ./garage/garage.toml:/garage.toml:ro
ports:
- '3900:3900' # S3-compatible API
- '3901:3901' # RPC
- '3902:3902' # K2V API (optional, kept for tooling)
- '3903:3903' # Admin API
healthcheck:
test: ['CMD', '/garage', '-c', '/garage.toml', 'status']
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres-data-dev:
garage-data: