# slonbase + PostgreSQL. # # echo "POSTGRES_PASSWORD=$(openssl rand -hex 24)" > .env # or: cp .env.example .env # docker compose up -d # docker compose logs slonbase # prints the one-time setup link # # The database URL is passed in through the environment, so the setup wizard # only asks for the first superuser. To use a database running elsewhere, # run only the slonbase service and enter the connection in the wizard instead. # # The slonbase image is pulled from ghcr.io (pin a release with SLONBASE_VERSION); # when it can't be pulled, or with `docker compose up --build`, it's built from # this checkout instead. services: postgres: image: postgres:17-alpine restart: unless-stopped environment: POSTGRES_DB: ${POSTGRES_DB:-slonbase} POSTGRES_USER: ${POSTGRES_USER:-slonbase} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in .env} volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U \"$$POSTGRES_USER\" -d \"$$POSTGRES_DB\""] interval: 5s timeout: 5s retries: 10 slonbase: image: ghcr.io/ayeshrodz/slonbase:${SLONBASE_VERSION:-latest} build: . restart: unless-stopped depends_on: postgres: condition: service_healthy environment: SLONBASE_DATABASE_URL: postgres://${POSTGRES_USER:-slonbase}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-slonbase}?sslmode=disable RUST_LOG: ${RUST_LOG:-info} ports: - "${SLONBASE_PORT:-8090}:8090" volumes: - slonbase_data:/data volumes: pgdata: slonbase_data: