peppa/infra/docker-compose.yml
2026-11-16 15:54:13 +05:00

86 lines
3.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Peppa's docker services in one compose project `peppa` (one group in OrbStack):
# bugsink — error tracker of the factory's projects (PEP-58), 127.0.0.1:3180; its database is
# SQLite in the volume `peppa-bugsink-data` (PEP-63)
# postgres — profile `legacy` only: Bugsink's former database, kept until the move to SQLite is
# confirmed (scripts/bugsink-migrate-to-sqlite.sh), then removed. Not started by default.
# act-runner — Gitea Actions runner of Peppa's projects, label `peppa-trusted` (PEP-57)
# Gitea, Traefik and the projects' deployments (`<slug>-<env>`) are not part of it.
# Secrets come from Peppa's .env: scripts/infra-up.sh [service…]
name: peppa
services:
# Legacy (PEP-63): `docker compose --profile legacy up -d postgres` — the source of the move to
# SQLite and the rollback (infra/bugsink-legacy-pg.yml). Delete with its volume once Bugsink has
# run on SQLite for a week.
postgres:
image: postgres:17-alpine
container_name: peppa-postgres
profiles: [legacy]
restart: unless-stopped
environment:
POSTGRES_USER: peppa
POSTGRES_PASSWORD: peppa
POSTGRES_DB: peppa
ports:
- "127.0.0.1:5433:5432"
volumes:
- peppa-pg:/var/lib/postgresql/data
bugsink:
image: bugsink/bugsink:2.6.3
container_name: peppa-bugsink
restart: unless-stopped
ports:
- "127.0.0.1:3180:8000"
volumes:
- peppa-bugsink-data:/data
environment:
SECRET_KEY: ${BUGSINK_SECRET_KEY:?BUGSINK_SECRET_KEY in .env}
# No DATABASE_URL: SQLite (WAL) at DATABASE_PATH, in the volume. Event payloads stay in the database.
DATABASE_PATH: /data/db.sqlite3
CREATE_SUPERUSER: ${BUGSINK_ADMIN_EMAIL:-admin@telecom.quest}:${BUGSINK_ADMIN_PASSWORD:?BUGSINK_ADMIN_PASSWORD in .env}
BASE_URL: ${BUGSINK_PUBLIC_URL:-https://bugsink.telecom.quest}
# Cloudflare terminates TLS, Traefik forwards plain HTTP.
BEHIND_HTTPS_PROXY: "true"
USER_REGISTRATION: "closed"
PHONEHOME: "false"
# Alerts go to Peppa on the host (http://host.docker.internal:3100/api/hooks/bugsink/…), a non-global address.
ALERTS_WEBHOOK_DENY_NON_GLOBAL: "false"
TIME_ZONE: Europe/Moscow
extra_hosts:
- "host.docker.internal:host-gateway"
# Jobs run in containers with the host's docker.sock (image builds, deploys), so the runner is
# registered ONLY on Peppa's project repos: on peppa-bot (its repos) and one per repo of another
# owner (`peppa ci connect`). Never an instance-wide registration.
# scripts/ci-runner-register.sh peppa-bot — registration on peppa-bot's repos
act-runner:
image: gitea/act_runner:0.2.11
container_name: peppa-act-runner
restart: unless-stopped
entrypoint: ["/sbin/tini", "--", "/peppa/act-runner/supervise.sh"]
environment:
# Gitea is on Traefik's docker network: the runner reaches it directly, not via Cloudflare.
GITEA_INSTANCE_URL: http://gitea:3000
volumes:
# Каталогом, а не отдельными файлами (PEP-162): git при checkout/merge переписывает файл новым
# inode, и файловый bind-mount внутри контейнера пустеет («No such file»).
- ./act-runner:/peppa/act-runner:ro
- peppa-act-runner:/data
- /var/run/docker.sock:/var/run/docker.sock
networks:
- traefik_default
volumes:
# Bugsink's SQLite database (PEP-63). Fixed name: scripts/bugsink-migrate-to-sqlite.sh fills it.
peppa-bugsink-data:
name: peppa-bugsink-data
# Postgres data (profile `legacy`): Bugsink's former database; delete after the week of rollback.
peppa-pg:
# Registration (.runner) of the runner from the former `peppa-ci` project: kept as is.
peppa-act-runner:
name: peppa-ci_peppa-act-runner
networks:
traefik_default:
external: true