feat(flags): fix hobby deployment for flags and run the flags service locally when running the app via bin/start (#34378)

This commit is contained in:
Dylan Martin
2025-07-01 16:21:53 -07:00
committed by GitHub
parent 6f7d654afd
commit 9a436ed07b
4 changed files with 22 additions and 5 deletions

View File

@@ -46,6 +46,11 @@ procs:
bin/check_kafka_clickhouse_up && \
bin/start-rust-service cymbal
feature-flags:
shell: |-
bin/check_postgres_up posthog && \
bin/start-rust-service feature-flags
property-defs-rs:
shell: |-
bin/check_postgres_up && \

View File

@@ -88,6 +88,21 @@ case "$RS_SVC" in
export ALLOW_INTERNAL_IPS=${ALLOW_INTERNAL_IPS:-true}
;;
feature-flags)
# Download MaxMind DB if it doesn't exist
./bin/download-mmdb
export RUST_LOG=debug,tower=warn,maxminddb=warn
export RUST_BACKTRACE=1
export WRITE_DATABASE_URL=postgres://posthog:posthog@localhost:5432/posthog
export READ_DATABASE_URL=postgres://posthog:posthog@localhost:5432/posthog
export MAXMIND_DB_PATH=../share/GeoLite2-City.mmdb
export REDIS_URL=redis://localhost:6379/
export ADDRESS=0.0.0.0:3001
export DEBUG=1
export ALLOW_INTERNAL_IPS=${ALLOW_INTERNAL_IPS:-true}
;;
*)
echo "ERROR unknown posthog/rust service '$RS_SVC' please register in: $0" >&2
exit 1

View File

@@ -245,8 +245,6 @@ services:
# REDIS_TIMEOUT_MS: 200
ADDRESS: '0.0.0.0:3001'
RUST_LOG: 'info'
SKIP_WRITES: 'false'
SKIP_READS: 'false'
plugins:
command: ./bin/plugin-server --no-restart-loop

View File

@@ -14,13 +14,12 @@ services:
service: proxy
ports:
- 8010:8000
depends_on:
- feature-flags
extra_hosts:
- 'web:host-gateway'
- 'plugins:host-gateway'
- 'capture:host-gateway'
- 'replay-capture:host-gateway'
- 'feature-flags:host-gateway'
environment:
CADDYFILE: |
http://localhost:8000 {
@@ -58,7 +57,7 @@ services:
}
handle @flags {
reverse_proxy feature-flags:3001
reverse_proxy host.docker.internal:3001
}
handle @webhooks {