76 lines
2.7 KiB
YAML
76 lines
2.7 KiB
YAML
# CT140 — Gitea, act_runner, Promtail, Beszel-agent.
|
||
# Единый источник истины для этого контейнера.
|
||
# Секреты — в /opt/ct140/.env (chmod 600), в Git не попадают.
|
||
#
|
||
# ЛОВУШКА (проверено 28.10.2026): внутри CT140 AppArmor не даёт Docker
|
||
# загрузить профиль docker-default. Любой контейнер здесь стартует только
|
||
# с security_opt: apparmor:unconfined. Для act_runner этого мало: он сам
|
||
# создаёт job-контейнеры, поэтому ему нужен ещё container.options
|
||
# в /opt/gitea-runner/config.yaml (разбор: ops/gitea/RUNNER-APPARMOR-2026-10-28.md).
|
||
|
||
services:
|
||
gitea:
|
||
image: gitea/gitea:latest
|
||
container_name: gitea
|
||
restart: unless-stopped
|
||
security_opt: ["apparmor:unconfined"]
|
||
environment:
|
||
GITEA__oauth2__ENABLED: "true"
|
||
GITEA__oauth2__GITEA__NAME: Authentik
|
||
GITEA__oauth2__GITEA__PROVIDER: openidConnect
|
||
GITEA__oauth2__GITEA__CLIENT_ID: gitea-oidc
|
||
GITEA__oauth2__GITEA__CLIENT_SECRET: ${GITEA_OAUTH_CLIENT_SECRET}
|
||
GITEA__oauth2__GITEA__OPENID_CONNECT_AUTO_DISCOVERY_URL: https://authentik.buryans.ru/application/o/gitea/.well-known/openid-configuration
|
||
GITEA__server__ROOT_URL: https://git.buryans.ru/
|
||
GITEA_CUSTOM: /data/gitea
|
||
ports:
|
||
- "222:22"
|
||
- "3000:3000"
|
||
volumes:
|
||
- /opt/gitea:/data
|
||
|
||
gitea-runner:
|
||
image: gitea/act_runner:latest
|
||
container_name: gitea-runner
|
||
restart: unless-stopped
|
||
security_opt: ["apparmor:unconfined"]
|
||
environment:
|
||
CONFIG_FILE: /data/config.yaml
|
||
GITEA_INSTANCE_URL: http://192.168.1.140:3000
|
||
GITEA_RUNNER_NAME: ct140-runner
|
||
GITEA_RUNNER_REGISTRATION_TOKEN: ${GITEA_RUNNER_REGISTRATION_TOKEN}
|
||
volumes:
|
||
- /opt/gitea-runner:/data
|
||
- /var/run/docker.sock:/var/run/docker.sock
|
||
depends_on:
|
||
- gitea
|
||
|
||
promtail:
|
||
image: grafana/promtail:3.2.1
|
||
container_name: promtail
|
||
restart: unless-stopped
|
||
security_opt: ["apparmor:unconfined"]
|
||
network_mode: host
|
||
command: ["-config.file=/etc/promtail/config.yml"]
|
||
volumes:
|
||
- /opt/promtail-config.yml:/etc/promtail/config.yml:ro
|
||
- /var/run/docker.sock:/var/run/docker.sock
|
||
- /var/lib/docker/containers:/var/lib/docker/containers:ro
|
||
|
||
beszel-agent:
|
||
image: henrygd/beszel-agent:latest
|
||
container_name: beszel-agent
|
||
restart: unless-stopped
|
||
security_opt: ["apparmor:unconfined"]
|
||
network_mode: host
|
||
environment:
|
||
KEY: ${BESZEL_KEY}
|
||
HUB_URL: http://192.168.1.110:8092
|
||
LISTEN: "45876"
|
||
volumes:
|
||
- beszel-data:/var/lib/beszel-agent
|
||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||
|
||
volumes:
|
||
beszel-data:
|