added conditon to create db
Some checks failed
github / Analyze (go) (push) Has been cancelled
github / Analyze (actions) (push) Has been cancelled
github / Analyze (javascript-typescript) (push) Has been cancelled
make / build-apps (push) Has been cancelled
make / probod binary (darwin/amd64) (push) Has been cancelled
make / probod binary (freebsd/amd64) (push) Has been cancelled
make / probod binary (linux/amd64) (push) Has been cancelled
make / probod binary (openbsd/amd64) (push) Has been cancelled
make / probod binary (windows/amd64) (push) Has been cancelled
make / probod binary (darwin/arm64) (push) Has been cancelled
make / probod binary (freebsd/arm64) (push) Has been cancelled
make / probod binary (linux/arm64) (push) Has been cancelled
make / probod binary (openbsd/arm64) (push) Has been cancelled
make / probo-agent (darwin/amd64) (push) Has been cancelled
make / probo-agent (freebsd/amd64) (push) Has been cancelled
make / probo-agent (linux/amd64) (push) Has been cancelled
make / probo-agent (windows/amd64) (push) Has been cancelled
make / probo-agent (darwin/arm64) (push) Has been cancelled
make / probo-agent (freebsd/arm64) (push) Has been cancelled
make / probo-agent (linux/arm64) (push) Has been cancelled
make / probo-agent (windows/arm64) (push) Has been cancelled
make / docker (amd64) (push) Has been cancelled
make / docker (arm64) (push) Has been cancelled
make / snapshot-scan (push) Has been cancelled
make / build-probod (push) Has been cancelled
make / build-probo-agent (push) Has been cancelled
make / lint-go (push) Has been cancelled
make / lint-js (push) Has been cancelled
make / lint-swift (push) Has been cancelled
make / lint-shell (push) Has been cancelled
make / test (push) Has been cancelled
make / test-e2e (push) Has been cancelled
trufflehog / scan (push) Has been cancelled

This commit is contained in:
2026-08-01 22:11:26 +05:30
parent 5f776f4f04
commit 4c4a72274c

View File

@@ -53,11 +53,36 @@ services:
depends_on:
postgres:
condition: service_healthy
postgres-init:
condition: service_completed_successfully
seaweedfs:
condition: service_started
chrome:
condition: service_started
# One-shot, idempotent DB bootstrap. Postgres only runs
# docker-entrypoint-initdb.d scripts the very first time it starts against
# an empty data volume, so if that volume was ever initialized without the
# "probod" database existing (e.g. an earlier deploy attempt), it never
# gets created on later restarts. This runs on every startup and is safe
# to repeat.
postgres-init:
image: "postgres@sha256:7ad98329d513dd497293b951c195ca354274a77f12ddbbbbf85e68a811823d72"
depends_on:
postgres:
condition: service_healthy
environment:
PGPASSWORD: "postgres"
entrypoint:
- "/bin/sh"
- "-c"
- |
set -eu
psql -h postgres -U postgres -v ON_ERROR_STOP=1 <<-'SQL'
SELECT 'CREATE DATABASE probod' WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'probod')\gexec
ALTER DATABASE probod SET probo.trust_center_base_domain TO 'probopage.localhost';
SQL
postgres:
image: "postgres@sha256:7ad98329d513dd497293b951c195ca354274a77f12ddbbbbf85e68a811823d72"
shm_size: "1g"