diff --git a/poc/gitea/stack-compose.yml b/poc/gitea/stack-compose.yml index 7f20f19..fe2e98b 100644 --- a/poc/gitea/stack-compose.yml +++ b/poc/gitea/stack-compose.yml @@ -1,4 +1,3 @@ - # Gitea Actions stack. Uses a dedicated act_runner cache-server so that # job-container networks can reach the cache backend via Swarm service DNS # (gitea_cache_server:37051) instead of the unreachable IP the built-in @@ -14,9 +13,13 @@ services: - gitea - nginx_ingress volumes: - - data:/data + - /root/volumes/gitea:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro + deploy: + placement: + constraints: + - node.hostname == odroid ports: - "3002:3000" - "222:22" @@ -47,6 +50,41 @@ services: secrets: - gitea_cache_secret deploy: + placement: + constraints: + - node.hostname == odroid + restart_policy: + condition: on-failure + delay: 5s + max_attempts: 3 + + runner_rudolf_t: + image: docker.io/gitea/act_runner:nightly + entrypoint: ["/usr/local/bin/runner-run.sh"] + environment: + CONFIG_FILE: /cfg/config.yaml + GITEA_INSTANCE_URL: "https://gitea.rudolf.keenetic.link" + GITEA_RUNNER_REGISTRATION_TOKEN: "ZIB6L21imA3XJkq65Cq1h43NzB5U1zhAJK9ybfCz" + GITEA_RUNNER_NAME: "runner2" + GITEA_RUNNER_LABELS: "runner_label1" + ACT_RUNNER_EXTERNAL_SECRET_FILE: /run/secrets/gitea_cache_secret + networks: + - gitea + configs: + - source: runner_config + target: /cfg/config.yaml + mode: 0444 + - source: runner_run + target: /usr/local/bin/runner-run.sh + mode: 0755 + volumes: + - /var/run/docker.sock:/var/run/docker.sock + secrets: + - gitea_cache_secret + deploy: + placement: + constraints: + - node.hostname == rudolf-T restart_policy: condition: on-failure delay: 5s @@ -82,6 +120,8 @@ networks: external: true gitea: driver: overlay + driver_opts: + com.docker.network.driver.mtu: "1200" configs: runner_config: @@ -99,11 +139,11 @@ secrets: external: true volumes: - data: - driver: local - driver_opts: - type: nfs - o: addr=192.168.1.96 - device: :/root/volumes/gitea - # device: :/media/DATA/runtime/gitea + # data: + # driver: local + # driver_opts: + # type: nfs + # o: addr=192.168.1.96 + # device: :/root/volumes/gitea + # # device: :/media/DATA/runtime/gitea cache_data: \ No newline at end of file