1
0
Fork 0
myserver-configuration/roles/gitea/templates/docker-compose.yml

61 lines
2 KiB
YAML
Raw Normal View History

version: "3"
services:
gitea:
image: gitea/gitea:latest
environment:
- USER_UID=1000
- USER_GID=1000
2023-10-15 21:49:22 +02:00
- GITEA__service__DISABLE_REGISTRATION=true
- GITEA__actions__ENABLED=true
- GITEA__actions__DEFAULT_ACTIONS_URL=self
- GITEA__packages__ENABLED=true
container_name: gitea
restart: unless-stopped
volumes:
- {{ server.work_dir }}/gitea/data/:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
networks:
- proxy
- interne
labels:
- traefik.enable=true
- traefik.docker.network=proxy
# HTTP Reverse proxy Gitea
- traefik.http.routers.gitea-secure.entrypoints=https
- traefik.http.routers.gitea-secure.rule=Host(`gitea.{{ server.domain }}`)
- traefik.http.routers.gitea-secure.tls=true
- traefik.http.routers.gitea-secure.tls.certresolver=sslResolver
- traefik.http.routers.gitea-secure.service=gitea
- traefik.http.services.gitea.loadbalancer.server.port=3000
2023-11-20 21:37:15 +01:00
# TCP SSH Reverse proxy Gitea
- traefik.tcp.routers.gitea-ssh.rule=HostSNI(`*`)
- traefik.tcp.routers.gitea-ssh.entrypoints=ssh
- traefik.tcp.routers.gitea-ssh.service=gitea-ssh
- traefik.tcp.services.gitea-ssh.loadbalancer.server.port=22
logging:
driver: loki
options:
loki-url: "https://lokidoki:vEGH5Z5siWgcDkNknvCVzPCyqhHSBJCBjeBRZJvxUP8SdgfxJ6AqCGutCWugGsx5@loki.mrdev023.fr/loki/api/v1/push"
mode: non-blocking
2023-11-20 21:37:15 +01:00
runner:
2023-11-21 20:05:17 +01:00
image: gitea/act_runner:latest-dind-rootless
2023-11-20 21:37:15 +01:00
restart: unless-stopped
2023-11-21 20:05:17 +01:00
privileged: true
2023-11-20 21:37:15 +01:00
depends_on:
- gitea
volumes:
- {{ server.work_dir }}/gitea/runner/:/data
environment:
2023-11-21 20:05:17 +01:00
- DOCKER_HOST=unix:///var/run/user/1000/docker.sock
2023-11-20 21:37:15 +01:00
- GITEA_INSTANCE_URL=https://gitea.{{ server.domain }}
- GITEA_RUNNER_REGISTRATION_TOKEN={{ gitea.runner_registration_token }}
networks:
interne:
metrics:
external: true
proxy:
external: true