2023-11-30 18:20:13 +01:00
|
|
|
version: "3.9"
|
|
|
|
services:
|
|
|
|
unleash:
|
2023-12-14 15:12:13 +01:00
|
|
|
image: ${UNLEASH_DOCKER_IMAGE:-unleashorg/unleash-server:latest} # this is the latest stable release
|
2023-11-30 18:20:13 +01:00
|
|
|
pull_policy: "always"
|
|
|
|
ports:
|
2023-12-14 15:12:13 +01:00
|
|
|
- "${EXPOSED_PORT:-4242}:4242"
|
2023-11-30 18:20:13 +01:00
|
|
|
environment:
|
|
|
|
DATABASE_URL: "postgres://postgres:unleash@db/unleash"
|
|
|
|
DATABASE_SSL: "false"
|
|
|
|
LOG_LEVEL: "debug"
|
|
|
|
INIT_ADMIN_API_TOKENS: "*:*.unleash-insecure-admin-api-token"
|
|
|
|
depends_on:
|
|
|
|
db:
|
|
|
|
condition: service_healthy
|
|
|
|
healthcheck:
|
|
|
|
test: wget --no-verbose --tries=1 --spider http://localhost:4242/health || exit 1
|
|
|
|
interval: 1s
|
|
|
|
timeout: 1m
|
|
|
|
retries: 5
|
|
|
|
start_period: 15s
|
|
|
|
|
2023-12-14 15:12:13 +01:00
|
|
|
another-unleash:
|
|
|
|
image: ${UNLEASH_DOCKER_IMAGE:-unleashorg/unleash-server:latest} # this is the latest stable release
|
|
|
|
pull_policy: "always"
|
|
|
|
ports:
|
|
|
|
- "${EXPOSED_PORT:-4243}:4242"
|
|
|
|
environment:
|
|
|
|
DATABASE_URL: "postgres://postgres:unleash@db/unleash"
|
|
|
|
DATABASE_SSL: "false"
|
|
|
|
LOG_LEVEL: "debug"
|
|
|
|
INIT_ADMIN_API_TOKENS: "*:*.unleash-insecure-admin-api-token"
|
|
|
|
depends_on:
|
|
|
|
db:
|
|
|
|
condition: service_healthy
|
|
|
|
healthcheck:
|
|
|
|
test: wget --no-verbose --tries=1 --spider http://localhost:4242/health || exit 1
|
|
|
|
interval: 1s
|
|
|
|
timeout: 1m
|
|
|
|
retries: 5
|
|
|
|
start_period: 15s
|
2023-11-30 18:20:13 +01:00
|
|
|
db:
|
|
|
|
ports:
|
|
|
|
- "5432:5432"
|
|
|
|
expose:
|
|
|
|
- "5432"
|
|
|
|
image: postgres:16
|
|
|
|
environment:
|
|
|
|
POSTGRES_DB: "unleash"
|
|
|
|
# trust incoming connections blindly (DON'T DO THIS IN PRODUCTION!)
|
|
|
|
POSTGRES_HOST_AUTH_METHOD: "trust"
|
|
|
|
healthcheck:
|
|
|
|
test:
|
|
|
|
[
|
|
|
|
"CMD",
|
|
|
|
"pg_isready",
|
|
|
|
"--username=postgres",
|
|
|
|
"--host=127.0.0.1",
|
|
|
|
"--port=5432",
|
|
|
|
]
|
|
|
|
interval: 2s
|
|
|
|
timeout: 1m
|
|
|
|
retries: 5
|
|
|
|
start_period: 10s
|