-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
41 lines (39 loc) · 1.24 KB
/
docker-compose.yml
File metadata and controls
41 lines (39 loc) · 1.24 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
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: primer
POSTGRES_USER: primer
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-primer}
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U primer"]
interval: 5s
timeout: 3s
retries: 5
primer:
build: .
ports:
- "${PRIMER_PORT:-8000}:8000"
env_file:
- path: .env
required: false
environment:
PRIMER_DATABASE_URL: postgresql://primer:${POSTGRES_PASSWORD:-primer}@postgres:5432/primer
PRIMER_ADMIN_API_KEY: ${PRIMER_ADMIN_API_KEY:-change-me-in-production}
PRIMER_JWT_SECRET_KEY: ${PRIMER_JWT_SECRET_KEY:-change-me-in-production}
PRIMER_CORS_ORIGINS: '["http://localhost:${PRIMER_PORT:-8000}"]'
PRIMER_BASE_URL: http://localhost:${PRIMER_PORT:-8000}
PRIMER_GITHUB_REDIRECT_URI: http://localhost:${PRIMER_PORT:-8000}/auth/callback
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
interval: 10s
timeout: 5s
retries: 3
start_period: 15s
volumes:
pgdata: