-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
111 lines (105 loc) · 3.9 KB
/
docker-compose.yml
File metadata and controls
111 lines (105 loc) · 3.9 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
103
104
105
106
107
108
109
110
111
x-logging: &default-logging
driver: json-file
options:
max-size: "10m"
max-file: "3"
services:
migrate:
image: docker.io/fredrikburmester/streamystats-v2-migrate:${VERSION:-latest}
environment:
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@vectorchord:5432/${POSTGRES_DB:-streamystats}
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- POSTGRES_DB=${POSTGRES_DB:-streamystats}
- PGPASSWORD=${POSTGRES_PASSWORD:-postgres}
depends_on:
vectorchord:
condition: service_healthy
restart: "no"
logging: *default-logging
networks:
- app-network
nextjs-app:
image: docker.io/fredrikburmester/streamystats-v2-nextjs:${VERSION:-latest}
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@vectorchord:5432/${POSTGRES_DB:-streamystats}
- JOB_SERVER_URL=http://job-server:3005
- HOSTNAME=0.0.0.0
- SESSION_SECRET=${SESSION_SECRET}
# Stable encryption key for server action closures (prevents session breakage on redeploy)
- NEXT_SERVER_ACTIONS_ENCRYPTION_KEY=${NEXT_SERVER_ACTIONS_ENCRYPTION_KEY}
depends_on:
vectorchord:
condition: service_healthy
migrate:
condition: service_completed_successfully
job-server:
condition: service_healthy
restart: unless-stopped
logging: *default-logging
networks:
- app-network
job-server:
image: docker.io/fredrikburmester/streamystats-v2-job-server:${VERSION:-latest}
environment:
- NODE_ENV=production
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@vectorchord:5432/${POSTGRES_DB:-streamystats}
- PORT=3005
- HOST=0.0.0.0
# Session polling interval in milliseconds (default: 5000)
- SESSION_POLL_INTERVAL_MS=${SESSION_POLL_INTERVAL_MS:-5000}
# Cron schedules (standard cron syntax)
- CRON_ACTIVITY_SYNC=${CRON_ACTIVITY_SYNC:-*/1 * * * *}
- CRON_RECENT_ITEMS_SYNC=${CRON_RECENT_ITEMS_SYNC:-*/1 * * * *}
- CRON_USER_SYNC=${CRON_USER_SYNC:-*/1 * * * *}
- CRON_PEOPLE_SYNC=${CRON_PEOPLE_SYNC:-*/15 * * * *}
- CRON_EMBEDDINGS_SYNC=${CRON_EMBEDDINGS_SYNC:-*/15 * * * *}
- CRON_GEOLOCATION_SYNC=${CRON_GEOLOCATION_SYNC:-*/5 * * * *}
- CRON_FINGERPRINT_SYNC=${CRON_FINGERPRINT_SYNC:-0 4 * * *}
- CRON_JOB_CLEANUP=${CRON_JOB_CLEANUP:-*/1 * * * *}
- CRON_OLD_JOB_CLEANUP=${CRON_OLD_JOB_CLEANUP:-0 3 * * *}
- CRON_FULL_SYNC=${CRON_FULL_SYNC:-0 2 * * *}
- CRON_DELETED_ITEMS_CLEANUP=${CRON_DELETED_ITEMS_CLEANUP:-0 * * * *}
# Skip full sync on server startup (set to "true" or "1" to skip)
- SKIP_STARTUP_FULL_SYNC=${SKIP_STARTUP_FULL_SYNC:-false}
depends_on:
vectorchord:
condition: service_healthy
migrate:
condition: service_completed_successfully
restart: unless-stopped
logging: *default-logging
networks:
- app-network
vectorchord:
image: tensorchord/vchord-postgres:pg17-v0.4.1
command: ["postgres", "-c", "log_checkpoints=off"]
environment:
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- POSTGRES_DB=${POSTGRES_DB:-streamystats}
- POSTGRES_HOST_AUTH_METHOD=scram-sha-256
- POSTGRES_INITDB_ARGS=--auth-host=scram-sha-256
volumes:
- vectorchord_data:/var/lib/postgresql/data
restart: unless-stopped
logging: *default-logging
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-streamystats}",
]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
networks:
- app-network
volumes:
vectorchord_data:
networks:
app-network: