coolify/templates/compose/unleash-with-postgresql.yaml

51 lines
1.5 KiB
YAML
Raw Normal View History

2024-04-14 17:21:30 +02:00
# documentation: https://docs.getunleash.io
2024-04-16 12:42:12 +02:00
# slogan: Open source feature flag management for enterprises.
2024-04-14 17:21:30 +02:00
# tags: unleash,feature flags,feature toggles,ab testing,open source
# logo: svgs/unleash.svg
# port: 4242
services:
unleash:
2024-04-16 12:42:12 +02:00
image: "unleashorg/unleash-server:latest"
2024-04-14 17:21:30 +02:00
environment:
- SERVICE_FQDN_UNLEASH_4242
- UNLEASH_URL=${SERVICE_FQDN_UNLEASH}
2024-04-16 12:42:12 +02:00
- UNLEASH_DEFAULT_ADMIN_PASSWORD=${SERVICE_PASSWORD_UNLEASH}
- "DATABASE_URL=postgres://$SERVICE_USER_POSTGRES:$SERVICE_PASSWORD_POSTGRES@postgres/db"
2024-04-14 17:21:30 +02:00
- DATABASE_SSL=false
- LOG_LEVEL=warn
- INIT_FRONTEND_API_TOKENS=default:default:development.unleash-insecure-frontend-api-token
- INIT_CLIENT_API_TOKENS=default:development.unleash-insecure-api-token
depends_on:
postgres:
condition: service_healthy
command:
- node
- index.js
healthcheck:
2024-05-17 10:11:55 +02:00
test: "wget --no-verbose --tries=1 --spider http://127.0.0.1:4242/health || exit 1"
2024-04-14 17:21:30 +02:00
interval: 1s
timeout: 1m
retries: 5
start_period: 15s
postgres:
image: postgres:15
volumes:
- postgresql-data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=$SERVICE_USER_POSTGRES
- POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
- POSTGRES_DB=db
healthcheck:
test:
- CMD
- pg_isready
2024-04-16 12:42:12 +02:00
- "--username=$SERVICE_USER_POSTGRES"
- "--host=127.0.0.1"
- "--port=5432"
- "--dbname=db"
2024-04-14 17:21:30 +02:00
interval: 2s
timeout: 1m
retries: 5
start_period: 10s