-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
34 lines (34 loc) · 906 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
34 lines (34 loc) · 906 Bytes
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
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: app
POSTGRES_PASSWORD: app
POSTGRES_DB: benchmarks
ports:
- '${POSTGRES_PORT:-5432}:5432'
volumes:
- db_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U app -d benchmarks']
interval: 5s
timeout: 5s
retries: 10
server:
build: ./server
environment:
DATABASE_URL: postgresql://app:app@db:5432/benchmarks?schema=public
PORT: 3001
ARTIFACT_STORAGE_ROOT: /app/artifacts
ARTIFACT_UPLOAD_SECRET: ${ARTIFACT_UPLOAD_SECRET:-encodingdb-local-v7-artifact-secret}
command: sh -c "npx prisma migrate deploy && node dist/index.js"
depends_on:
db:
condition: service_healthy
ports:
- '3001:3001'
volumes:
- artifact_data:/app/artifacts
volumes:
db_data:
artifact_data: