Skip to content

Instantly share code, notes, and snippets.

@ali-master
Created December 2, 2021 20:51
Show Gist options
  • Save ali-master/fd109d57ba6bdd6ecedc887d6a5366c0 to your computer and use it in GitHub Desktop.
Save ali-master/fd109d57ba6bdd6ecedc887d6a5366c0 to your computer and use it in GitHub Desktop.
Unleash self-hosted docker-compose version
version: "3.7"
services:
unleashDB:
expose:
- "5432"
image: postgres:13
container_name: unleashDB
networks:
- internal
environment:
POSTGRES_PASSWORD: "some_password"
POSTGRES_USER: "unleash_user"
POSTGRES_DB: "unleash"
healthcheck:
test: [ "CMD", "pg_isready", "--username=postgres", "--host=127.0.0.1", "--port=5432" ]
interval: 2s
timeout: 1m
retries: 5
start_period: 10s
logging:
driver: none
unleash:
container_name: unleash
image: unleashorg/unleash-server
restart: on-failure
networks:
- internal
- web
links:
- unleashDB
depends_on:
- unleashDB
command: npm run start
environment:
DATABASE_HOST: unleashDB
DATABASE_NAME: "unleash"
DATABASE_USERNAME: "unleash_user"
DATABASE_PASSWORD: "some_password"
DATABASE_SSL: "false"
ports:
- "4242:4242"
networks:
web:
external: true
driver: bridge
internal:
external: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment