Add runner restart

This commit is contained in:
2023-11-24 09:49:11 +02:00
parent dbd3d4ed26
commit 8909150a3b

View File

@@ -1,4 +1,3 @@
version: "2.1"
services:
gitea:
image: gitea/gitea:latest
@@ -11,7 +10,7 @@ services:
- DB_NAME=gitea
- DB_USER=gitea
- DB_PASSWD=gitea
restart: always
restart: unless-stopped
volumes:
- ./data:/data
- /etc/timezone:/etc/timezone:ro
@@ -27,16 +26,15 @@ services:
labels:
- "traefik.enable=true"
- "traefik.docker.network=gitea_network"
- "traefik.http.routers.gitea.entrypoints=websecure"
- "traefik.http.routers.gitea.entrypoints=pukekos"
- "traefik.http.services.gitea.loadbalancer.server.port=3000"
- "traefik.http.routers.gitea.rule=Host(`git.pukeko.xyz`)"
- "traefik.http.routers.gitea.tls.certresolver=pukekoresolver"
#- "traefik.http.routers.gitea.middlewares=authelia@docker"
- "traefik.http.routers.gitea.tls.certresolver=takaheresolver"
gitea-db:
image: postgres:14-alpine
container_name: gitea_db
restart: always
restart: unless-stopped
environment:
- POSTGRES_USER=gitea
- POSTGRES_PASSWORD=gitea
@@ -45,6 +43,23 @@ services:
- ./postgresql:/var/lib/postgresql/data:z
networks:
- internal
runner:
image: gitea/act_runner
container_name: gitea_runner
restart: unless-stopped
environment:
CONFIG_FILE: /config.yaml
GITEA_INSTANCE_URL: "https://git.pukeko.xyz"
GITEA_RUNNER_REGISTRATION_TOKEN: "yBMkL2pBNbtdphyceHRxjy59tSE5Uk6HhMZnJXvh"
GITEA_RUNNER_NAME: "gitea"
GITEA_RUNNER_LABELS: "${RUNNER_LABELS}"
volumes:
- ./runner_config/config.yaml:/config.yaml
- ./runner_data/data:/data
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- internal
networks:
network:
driver: bridge