-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.production.yml
More file actions
87 lines (81 loc) · 2.21 KB
/
docker-compose.production.yml
File metadata and controls
87 lines (81 loc) · 2.21 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
# SidMonitor — Production deployment (no source code needed)
#
# Usage:
# 1. Download this file
# 2. Create .env file (see below)
# 3. docker compose -f docker-compose.production.yml up -d
#
# Required .env:
# POSTGRES_PASSWORD=<strong-password>
# JWT_SECRET_KEY=<openssl rand -hex 32>
# CORS_ORIGINS=https://your-domain.com
services:
postgres:
image: postgres:15-alpine
environment:
POSTGRES_USER: sidmonitor
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env}
POSTGRES_DB: sidmonitor
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- sidmonitor
healthcheck:
test: ["CMD-SHELL", "pg_isready -U sidmonitor -d sidmonitor"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
clickhouse:
image: clickhouse/clickhouse-server:24.8
environment:
CLICKHOUSE_DB: sid_monitoring
CLICKHOUSE_USER: default
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
volumes:
- clickhouse_data:/var/lib/clickhouse
networks:
- sidmonitor
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:8123/ping"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
backend:
image: ghcr.io/junixlabs/sidmonitor-backend:latest
depends_on:
postgres:
condition: service_healthy
clickhouse:
condition: service_healthy
environment:
HOST: 0.0.0.0
PORT: 8000
DEBUG: "false"
DATABASE_URL: postgresql+asyncpg://sidmonitor:${POSTGRES_PASSWORD}@postgres:5432/sidmonitor
CLICKHOUSE_HOST: clickhouse
CLICKHOUSE_PORT: 8123
CLICKHOUSE_DATABASE: sid_monitoring
CLICKHOUSE_USER: default
CLICKHOUSE_PASSWORD: ""
JWT_SECRET_KEY: ${JWT_SECRET_KEY:?Set JWT_SECRET_KEY in .env}
CORS_ORIGINS: ${CORS_ORIGINS:-http://localhost:3000}
networks:
- sidmonitor
restart: unless-stopped
frontend:
image: ghcr.io/junixlabs/sidmonitor-frontend:latest
ports:
- "${FRONTEND_PORT:-3000}:80"
depends_on:
- backend
networks:
- sidmonitor
restart: unless-stopped
volumes:
postgres_data:
clickhouse_data:
networks:
sidmonitor:
driver: bridge