compose.briven-engine.local.yml54 lines · main
| 1 | # Local Doltgres only for briven-engine Auth DB (NO SuperTokens Core, NO stock Postgres). |
| 2 | # |
| 3 | # export BRIVEN_DOLTGRES_PASSWORD=devpass |
| 4 | # docker-compose -f infra/dokploy/compose.briven-engine.local.yml up -d |
| 5 | # |
| 6 | # API: |
| 7 | # BRIVEN_ENGINE_DATABASE_URL=postgres://postgres:devpass@127.0.0.1:5434/briven_engine?sslmode=disable |
| 8 | # BRIVEN_DATA_PLANE_URL=postgres://postgres:devpass@127.0.0.1:5434/postgres?sslmode=disable |
| 9 | |
| 10 | services: |
| 11 | doltgres: |
| 12 | image: dolthub/doltgresql@sha256:0483137d0309598d3b0c111dff85d565077bd91cb0524ce00bb832929d5d5ddc |
| 13 | environment: |
| 14 | DOLTGRES_USER: postgres |
| 15 | DOLTGRES_PASSWORD: ${BRIVEN_DOLTGRES_PASSWORD:-devpass} |
| 16 | ports: |
| 17 | - '5434:5432' |
| 18 | healthcheck: |
| 19 | test: ['CMD-SHELL', 'pg_isready -h 127.0.0.1 -p 5432 -U postgres'] |
| 20 | interval: 5s |
| 21 | timeout: 3s |
| 22 | retries: 15 |
| 23 | start_period: 20s |
| 24 | networks: |
| 25 | - briven-engine-local |
| 26 | labels: |
| 27 | - 'briven.db=doltgres' |
| 28 | |
| 29 | briven-engine-db-init: |
| 30 | image: dolthub/doltgresql@sha256:0483137d0309598d3b0c111dff85d565077bd91cb0524ce00bb832929d5d5ddc |
| 31 | restart: 'no' |
| 32 | depends_on: |
| 33 | doltgres: |
| 34 | condition: service_healthy |
| 35 | environment: |
| 36 | PGPASSWORD: ${BRIVEN_DOLTGRES_PASSWORD:-devpass} |
| 37 | entrypoint: |
| 38 | - /bin/sh |
| 39 | - -c |
| 40 | - | |
| 41 | set -e |
| 42 | exists=$$(psql -h doltgres -U postgres -d postgres -tAc "SELECT 1 FROM pg_database WHERE datname='briven_engine'" || true) |
| 43 | if [ "$$exists" = "1" ]; then |
| 44 | echo "briven_engine exists on doltgres" |
| 45 | else |
| 46 | psql -h doltgres -U postgres -d postgres -c 'CREATE DATABASE briven_engine' |
| 47 | echo "created briven_engine on doltgres" |
| 48 | fi |
| 49 | networks: |
| 50 | - briven-engine-local |
| 51 | |
| 52 | networks: |
| 53 | briven-engine-local: |
| 54 | name: briven-engine-local |