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

59 lines
2 KiB
YAML

services:
web:
image: codeberg.org/forgejo/forgejo:9
environment:
- USER_UID=1000
- USER_GID=1000
- FORGEJO__service__DISABLE_REGISTRATION=true
- FORGEJO__actions__ENABLED=true
- FORGEJO__actions__DEFAULT_ACTIONS_URL=self
- FORGEJO__packages__ENABLED=true
restart: unless-stopped
volumes:
- {{ server.work_dir }}/forgejo/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.git-secure.entrypoints=https
- traefik.http.routers.git-secure.rule=Host(`gitea.{{ server.domain }}`) || Host(`git.{{ server.domain }}`)
- traefik.http.routers.git-secure.tls=true
- traefik.http.routers.git-secure.tls.certresolver=sslResolver
- traefik.http.routers.git-secure.service=git
- traefik.http.services.git.loadbalancer.server.port=3000
# TCP SSH Reverse proxy Gitea
- traefik.tcp.routers.git-ssh.rule=HostSNI(`*`)
- traefik.tcp.routers.git-ssh.entrypoints=ssh
- traefik.tcp.routers.git-ssh.service=git-ssh
- traefik.tcp.services.git-ssh.loadbalancer.server.port=22
logging:
driver: loki
options:
loki-url: "https://lokidoki:vEGH5Z5siWgcDkNknvCVzPCyqhHSBJCBjeBRZJvxUP8SdgfxJ6AqCGutCWugGsx5@loki.mrdev023.fr/loki/api/v1/push"
mode: non-blocking
runner:
image: gitea/act_runner
restart: unless-stopped
depends_on:
- web
volumes:
- ./config.yml:/config.yml
- {{ server.work_dir }}/gitea/runner/:/data
- /var/run/docker.sock:/var/run/docker.sock
environment:
- CONFIG_FILE=/config.yml
- GITEA_INSTANCE_URL=https://gitea.{{ server.domain }}
- GITEA_RUNNER_REGISTRATION_TOKEN={{ gitea.runner_registration_token }}
networks:
interne:
metrics:
external: true
proxy:
external: true