Skip to content

Commit 632523f

Browse files
committed
Fix PostHog template: remove restart/volumes overrides, fix livestream config path
- Remove all restart: on-failure/always lines — Coolify applies restart: unless-paused automatically - Remove top-level volumes: section — Coolify auto-generates named volume declarations - Fix livestream config mount target: /configs/configs.yml → /code/configs/configs.yml (livestream binary uses WORKDIR /code, Viper searches configs/ relative to working dir) - Add LIVESTREAM_* env var fallbacks for config values - Add ports: - '8000' to proxy service so Coolify generates SERVICE_URL_PROXY for SITE_URL
1 parent e1fd5fa commit 632523f

File tree

1 file changed

+8
-36
lines changed

1 file changed

+8
-36
lines changed

templates/compose/posthog.yaml

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
services:
1010
db:
1111
image: postgres:15.12-alpine
12-
restart: on-failure
1312
environment:
1413
- POSTGRES_USER=posthog
1514
- POSTGRES_DB=posthog
@@ -25,7 +24,6 @@ services:
2524

2625
redis:
2726
image: redis:7.2-alpine
28-
restart: on-failure
2927
command: redis-server --maxmemory-policy allkeys-lru --maxmemory 500mb
3028
healthcheck:
3129
test: ['CMD', 'redis-cli', 'ping']
@@ -37,15 +35,13 @@ services:
3735

3836
zookeeper:
3937
image: zookeeper:3.7.0
40-
restart: on-failure
4138
volumes:
4239
- posthog-zookeeper-data:/data
4340
- posthog-zookeeper-datalog:/datalog
4441
- posthog-zookeeper-logs:/logs
4542

4643
clickhouse:
4744
image: clickhouse/clickhouse-server:25.12.5.44
48-
restart: on-failure
4945
depends_on:
5046
kafka:
5147
condition: service_started
@@ -1100,7 +1096,6 @@ services:
11001096

11011097
kafka:
11021098
image: docker.redpanda.com/redpandadata/redpanda:v25.1.9
1103-
restart: on-failure
11041099
command:
11051100
- redpanda
11061101
- start
@@ -1153,7 +1148,6 @@ services:
11531148

11541149
objectstorage:
11551150
image: minio/minio:RELEASE.2025-04-22T22-12-26Z
1156-
restart: on-failure
11571151
environment:
11581152
- MINIO_ROOT_USER=${SERVICE_USER_MINIO}
11591153
- MINIO_ROOT_PASSWORD=${SERVICE_PASSWORD_MINIO}
@@ -1164,7 +1158,6 @@ services:
11641158

11651159
seaweedfs:
11661160
image: chrislusf/seaweedfs:4.03
1167-
restart: on-failure
11681161
entrypoint:
11691162
- /bin/sh
11701163
- '-c'
@@ -1194,7 +1187,6 @@ services:
11941187

11951188
temporal:
11961189
image: temporalio/auto-setup:1.20.0
1197-
restart: on-failure
11981190
environment:
11991191
- DB=postgresql
12001192
- DB_PORT=5432
@@ -1227,15 +1219,13 @@ services:
12271219
12281220
temporal-admin-tools:
12291221
image: temporalio/admin-tools:1.20.0
1230-
restart: on-failure
12311222
environment:
12321223
- TEMPORAL_CLI_ADDRESS=temporal:7233
12331224
depends_on:
12341225
- temporal
12351226

12361227
temporal-ui:
12371228
image: temporalio/ui:2.31.2
1238-
restart: on-failure
12391229
environment:
12401230
- TEMPORAL_ADDRESS=temporal:7233
12411231
- TEMPORAL_CORS_ORIGINS=http://localhost:3000
@@ -1252,7 +1242,6 @@ services:
12521242
- /bin/bash
12531243
- '-c'
12541244
- './bin/migrate && ./bin/docker-server'
1255-
restart: on-failure
12561245
environment:
12571246
- OTEL_SDK_DISABLED=true
12581247
- DISABLE_SECURE_SSL_REDIRECT=true
@@ -1310,7 +1299,6 @@ services:
13101299
worker:
13111300
image: posthog/posthog:latest
13121301
command: ./bin/docker-worker-celery --with-scheduler
1313-
restart: on-failure
13141302
environment:
13151303
- OTEL_SDK_DISABLED=true
13161304
- DISABLE_SECURE_SSL_REDIRECT=true
@@ -1360,7 +1348,6 @@ services:
13601348
plugins:
13611349
image: posthog/posthog-node:latest
13621350
command: node nodejs/dist/index.js
1363-
restart: always
13641351
environment:
13651352
- DATABASE_URL=postgres://posthog:${SERVICE_PASSWORD_POSTGRES}@db:5432/posthog
13661353
- PERSONS_DATABASE_URL=postgres://posthog:${SERVICE_PASSWORD_POSTGRES}@db:5432/posthog
@@ -1416,7 +1403,6 @@ services:
14161403
temporal-django-worker:
14171404
image: posthog/posthog:latest
14181405
command: ./bin/temporal-django-worker
1419-
restart: on-failure
14201406
environment:
14211407
- OTEL_SDK_DISABLED=true
14221408
- DISABLE_SECURE_SSL_REDIRECT=true
@@ -1519,7 +1505,6 @@ services:
15191505

15201506
capture:
15211507
image: ghcr.io/posthog/posthog/capture:master
1522-
restart: on-failure
15231508
environment:
15241509
- ADDRESS=0.0.0.0:3000
15251510
- KAFKA_TOPIC=events_plugin_ingestion
@@ -1535,7 +1520,6 @@ services:
15351520

15361521
replay-capture:
15371522
image: ghcr.io/posthog/posthog/capture:master
1538-
restart: on-failure
15391523
environment:
15401524
- ADDRESS=0.0.0.0:3000
15411525
- KAFKA_TOPIC=session_recording_snapshot_item_events
@@ -1550,9 +1534,13 @@ services:
15501534

15511535
livestream:
15521536
image: ghcr.io/posthog/posthog/livestream:master
1553-
restart: on-failure
15541537
environment:
15551538
- LIVESTREAM_JWT_SECRET=${SERVICE_BASE64_64_SECRETKEY}
1539+
- LIVESTREAM_MMDB_PATH=/share/GeoLite2-City.mmdb
1540+
- LIVESTREAM_KAFKA_BROKERS=kafka:9092
1541+
- LIVESTREAM_KAFKA_TOPIC=events_plugin_ingestion
1542+
- LIVESTREAM_KAFKA_GROUP_ID=livestream
1543+
- LIVESTREAM_REDIS_ADDRESS=redis:6379
15561544
depends_on:
15571545
geoip-init:
15581546
condition: service_completed_successfully
@@ -1562,7 +1550,7 @@ services:
15621550
- posthog-share:/share
15631551
- type: bind
15641552
source: ./livestream/configs.yml
1565-
target: /configs/configs.yml
1553+
target: /code/configs/configs.yml
15661554
read_only: true
15671555
content: |
15681556
debug: false
@@ -1580,7 +1568,6 @@ services:
15801568
15811569
feature-flags:
15821570
image: ghcr.io/posthog/posthog/feature-flags:master
1583-
restart: on-failure
15841571
healthcheck:
15851572
test: ['CMD', 'curl', '-f', 'http://localhost:3001/_readiness']
15861573
interval: 5s
@@ -1610,7 +1597,6 @@ services:
16101597

16111598
property-defs-rs:
16121599
image: ghcr.io/posthog/posthog/property-defs-rs:master
1613-
restart: on-failure
16141600
environment:
16151601
- DATABASE_URL=postgres://posthog:${SERVICE_PASSWORD_POSTGRES}@db:5432/posthog
16161602
- KAFKA_HOSTS=kafka:9092
@@ -1625,7 +1611,6 @@ services:
16251611

16261612
cyclotron-janitor:
16271613
image: ghcr.io/posthog/posthog/cyclotron-janitor:master
1628-
restart: on-failure
16291614
environment:
16301615
- DATABASE_URL=postgres://posthog:${SERVICE_PASSWORD_POSTGRES}@db:5432/posthog
16311616
- KAFKA_HOSTS=kafka:9092
@@ -1652,7 +1637,6 @@ services:
16521637

16531638
cymbal:
16541639
image: ghcr.io/posthog/posthog/cymbal:master
1655-
restart: on-failure
16561640
environment:
16571641
- KAFKA_HOSTS=kafka:9092
16581642
- KAFKA_CONSUMER_GROUP=cymbal
@@ -1687,13 +1671,14 @@ services:
16871671
proxy:
16881672
image: caddy:2-alpine
16891673
command: caddy run -c /etc/caddy/Caddyfile
1690-
restart: always
16911674
environment:
16921675
- SERVICE_URL_PROXY_8000
16931676
depends_on:
16941677
- web
16951678
- capture
16961679
- livestream
1680+
ports:
1681+
- '8000'
16971682
volumes:
16981683
- type: bind
16991684
source: ./caddy/Caddyfile
@@ -1750,16 +1735,3 @@ services:
17501735
- posthog-caddy-data:/data
17511736
- posthog-caddy-config:/config
17521737

1753-
volumes:
1754-
posthog-postgres-data:
1755-
posthog-redis-data:
1756-
posthog-clickhouse-data:
1757-
posthog-zookeeper-data:
1758-
posthog-zookeeper-datalog:
1759-
posthog-zookeeper-logs:
1760-
posthog-kafka-data:
1761-
posthog-objectstorage:
1762-
posthog-seaweedfs:
1763-
posthog-share:
1764-
posthog-caddy-data:
1765-
posthog-caddy-config:

0 commit comments

Comments
 (0)