-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathdocker-compose.production.yml
More file actions
71 lines (65 loc) · 2.12 KB
/
docker-compose.production.yml
File metadata and controls
71 lines (65 loc) · 2.12 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
version: '3.8'
# Production docker-compose file that pulls pre-built images from GitHub Container Registry
# Usage: docker compose -f docker-compose.production.yml up -d
services:
postgres:
image: postgres:16-alpine
container_name: purdueio-postgres
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-purdueio}
POSTGRES_USER: ${POSTGRES_USER:-purdueio}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-purdueio}
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- purdueio-net
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-purdueio}"]
interval: 10s
timeout: 5s
retries: 5
api:
image: ghcr.io/purdue-io/purdueapi/api:latest
container_name: purdueio-api
restart: unless-stopped
ports:
- "${API_PORT:-8080}:8080"
environment:
DbProvider: Npgsql
DbConnectionString: "Host=postgres;Port=5432;Database=${POSTGRES_DB:-purdueio};Username=${POSTGRES_USER:-purdueio};Password=${POSTGRES_PASSWORD:-purdueio}"
ASPNETCORE_URLS: http://+:8080
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT:-Production}
depends_on:
postgres:
condition: service_healthy
networks:
- purdueio-net
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/odata/Terms || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
catalogsync:
image: ghcr.io/purdue-io/purdueapi/catalogsync:latest
container_name: purdueio-catalogsync
restart: unless-stopped
environment:
DB_PROVIDER: Npgsql
DB_CONNECTION_STRING: "Host=postgres;Port=5432;Database=${POSTGRES_DB:-purdueio};Username=${POSTGRES_USER:-purdueio};Password=${POSTGRES_PASSWORD:-purdueio}"
SYNC_SCHEDULE: ${SYNC_SCHEDULE:-0 2 * * *}
SYNC_TERMS: ${SYNC_TERMS:-}
SYNC_SUBJECTS: ${SYNC_SUBJECTS:-}
SYNC_ALL_TERMS: ${SYNC_ALL_TERMS:-false}
RUN_ONCE: ${RUN_ONCE:-false}
depends_on:
postgres:
condition: service_healthy
networks:
- purdueio-net
networks:
purdueio-net:
driver: bridge
volumes:
postgres-data: