-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathdocker-compose.example.yml
More file actions
102 lines (96 loc) · 3.13 KB
/
docker-compose.example.yml
File metadata and controls
102 lines (96 loc) · 3.13 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Docker Compose configuration for Synkronus
# This setup includes:
# - Synkronus API server
# - PostgreSQL database
# - Nginx reverse proxy
#
# For production deployment:
# 1. Update all passwords and secrets
# 2. Configure nginx SSL certificates (or use cloudflared tunnel)
# 3. Mount one volume at /app/data: bundles, versions, attachments
# 4. Configure backup strategy
services:
# Nginx reverse proxy
nginx:
image: nginx:alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
# Uncomment for SSL certificates:
# - ./ssl:/etc/nginx/ssl:ro
depends_on:
- synkronus
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 -O - http://127.0.0.1/health || wget --no-verbose --tries=1 -O - http://localhost/health"]
interval: 30s
timeout: 3s
retries: 3
# Synkronus API server
synkronus:
# Use pre-built image from GitHub Container Registry
image: ghcr.io/opendataensemble/synkronus:latest
# Or build locally for development:
# build:
# context: .
# args:
# SYNKRONUS_VERSION: ${SYNKRONUS_VERSION:-1.0.0}
expose:
- "8080"
# Only expose port directly if not using nginx:
# ports:
# - "8080:8080"
environment:
PORT: "8080"
LOG_LEVEL: "info"
# Database configuration - Update with your PostgreSQL credentials
DB_CONNECTION: "postgres://synkronus_user:CHANGE_THIS_PASSWORD@postgres:5432/synkronus?sslmode=disable"
# JWT Secret (MUST be changed in production!)
# Generate with: openssl rand -base64 32
JWT_SECRET: "CHANGE_THIS_TO_RANDOM_32_CHAR_STRING"
ADMIN_USERNAME: "admin"
ADMIN_PASSWORD: "CHANGE_THIS_ADMIN_PASSWORD"
# Emergency recovery flow (optional):
# If both values are set, Synkronus creates/overwrites this admin user at startup.
# Remove after recovery so credentials are not reset on restart.
# SYNKRONUS_RECOVERY_CREATE_USER: "admin"
# SYNKRONUS_RECOVERY_CREATE_PASS: "TEMPORARY_RECOVERY_PASSWORD"
MAX_VERSIONS_KEPT: "5"
volumes:
- synkronus_data:/app/data
depends_on:
- postgres
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 -O - http://127.0.0.1:8080/health || wget --no-verbose --tries=1 -O - http://localhost:8080/health"]
interval: 30s
timeout: 3s
retries: 3
start_period: 10s
# PostgreSQL database
postgres:
image: postgres:17
environment:
# Root PostgreSQL user and password (used to create application databases)
POSTGRES_USER: postgres
POSTGRES_PASSWORD: CHANGE_THIS_PASSWORD
volumes:
- postgres-data:/var/lib/postgresql/data
expose:
- "5432"
# Only expose port if you need external access:
# ports:
# - "5432:5432"
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
# Named volumes for data persistence
# These will persist data even if containers are removed
volumes:
postgres-data:
synkronus_data: