73 lines
1.9 KiB
YAML
73 lines
1.9 KiB
YAML
version: "3"
|
|
|
|
services:
|
|
gitea:
|
|
image: gitea/gitea:latest
|
|
container_name: gitea
|
|
environment:
|
|
- APP_NAME="Gitea"
|
|
- USER_UID=1000
|
|
- USER_GID=1000
|
|
- USER=git
|
|
- RUN_MODE=prod
|
|
- DOMAIN=gitea.knast.cc
|
|
- SSH_DOMAIN=gitea.knast.cc
|
|
- HTTP_PORT=3000
|
|
- ROOT_URL=https://gitea.knast.cc
|
|
- SSH_PORT=222
|
|
- SSH_LISTEN_PORT=22
|
|
- DB_TYPE=sqlite3
|
|
- GITEA__cache__ENABLED=true
|
|
- GITEA__cache__ADAPTER=redis
|
|
- GITEA__cache__HOST=redis://gitea-cache:6379/0?pool_size=100&idle_timeout=180s
|
|
- GITEA__cache__ITEM_TTL=24h
|
|
restart: unless-stopped
|
|
networks:
|
|
- traefik
|
|
volumes:
|
|
- /srv/gitea:/data
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
ports:
|
|
- "3000:3000"
|
|
- "222:22"
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.gitea.entrypoints=websecure"
|
|
- "traefik.http.routers.gitea.rule=Host(`gitea.$DOMAIN_NAME`)"
|
|
- "traefik.http.routers.gitea.tls.certresolver=letsencr"
|
|
- "traefik.http.services.gitea.loadbalancer.server.port=3000"
|
|
|
|
gitea-cache:
|
|
container_name: gitea-cache
|
|
image: redis:6-alpine
|
|
restart: unless-stopped
|
|
networks:
|
|
- traefik
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 15s
|
|
timeout: 3s
|
|
retries: 30
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "1m"
|
|
|
|
runner:
|
|
image: gitea/act_runner:latest
|
|
environment:
|
|
CONFIG_FILE: /config.yaml
|
|
GITEA_INSTANCE_URL: "https://gitea.knast.cc"
|
|
GITEA_RUNNER_REGISTRATION_TOKEN: "F27ZMdzwY0wunOmmkK9O4kwZFGeyORykFHZtJA9F"
|
|
GITEA_RUNNER_NAME: "BOB_THE_BUILDER"
|
|
GITEA_RUNNER_LABELS: "ALL"
|
|
volumes:
|
|
- /srv/gitea_runner/config/config.yaml:/config.yaml
|
|
- /srv/gitea_runner/data:/data
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
networks:
|
|
traefik:
|
|
external: true
|