Skip to content

Commit

Permalink
Add unleash as a service
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinip committed Apr 14, 2024
1 parent dc7f56b commit 2fc3dcc
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
1 change: 1 addition & 0 deletions public/svgs/unleash.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions templates/compose/unleash-with-postgresql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# documentation: https://docs.getunleash.io
# slogan: Unleash: Open source feature flag management for enterprises
# tags: unleash,feature flags,feature toggles,ab testing,open source
# logo: svgs/unleash.svg
# port: 4242

services:
unleash:
image: 'unleashorg/unleash-server:latest'
environment:
- SERVICE_FQDN_UNLEASH_4242
- UNLEASH_URL=${SERVICE_FQDN_UNLEASH}
- 'DATABASE_URL=postgres://$SERVICE_USER_POSTGRES:$SERVICE_PASSWORD_POSTGRES@postgres/db'
- 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:
test: 'wget --no-verbose --tries=1 --spider http://localhost:4242/health || exit 1'
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
- '--username=$SERVICE_USER_POSTGRES'
- '--host=127.0.0.1'
- '--port=5432'
- '--dbname=db'
interval: 2s
timeout: 1m
retries: 5
start_period: 10s

0 comments on commit 2fc3dcc

Please sign in to comment.