From 86fa4f85192843f46e6367c0a2239536326cdcec Mon Sep 17 00:00:00 2001 From: Gato Date: Fri, 5 Jun 2026 06:35:08 +0200 Subject: [PATCH] Changement du runner Signed-off-by: Gato --- .claude/settings.local.json | 13 +++++ .idea/.gitignore | 11 ++++ gitea/gitea-compose.yml | 110 ++++++++++++++++++++++++++++++++++++ 3 files changed, 134 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 gitea/gitea-compose.yml diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 5c5058d..cbf4327 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -1,8 +1,21 @@ { "permissions": { "allow": [ +<<<<<<< HEAD "Bash(ls /var/home/Gato/IdeaProjects/Infra/)", "Read(//var/home/Gato/IdeaProjects/Infra/**)" +======= + "Read(//var/home/Gato/Applications/Infra/keycloak/themes/bonsai/**)", + "Read(//var/home/Gato/Applications/Infra/keycloak/themes/bonsai/login/**)", + "Bash(realpath /var/home/Gato/Applications 2>/dev/null || ls /var/home/Gato/ | grep -i app)", + "Bash(ls /var/home/Gato/IdeaProjects/Infra && ls /var/home/Gato/IdeaProjects/bonsai-api)", + "Read(//var/home/Gato/IdeaProjects/**)", + "Bash(mkdir -p /var/home/Gato/IdeaProjects/Infra/bonsai-api)", + "Bash(git *)" + ], + "additionalDirectories": [ + "/var/home/Gato/IdeaProjects/Infra" +>>>>>>> 0453f6a (Changement du runner) ] } } diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..b28daef --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,11 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +/.idea diff --git a/gitea/gitea-compose.yml b/gitea/gitea-compose.yml new file mode 100644 index 0000000..5b93e1e --- /dev/null +++ b/gitea/gitea-compose.yml @@ -0,0 +1,110 @@ +name: gitea-stack + +services: + db: + image: postgres:16-alpine + container_name: gitea-db + restart: unless-stopped + environment: + POSTGRES_DB: gitea + POSTGRES_USER: gitea + POSTGRES_PASSWORD: change_me + TZ: Europe/Paris + healthcheck: + test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"] + interval: 10s + timeout: 5s + retries: 5 + volumes: + - ./db_data:/var/lib/postgresql/data + networks: + - gitea-net + + gitea: + image: gitea/gitea:latest + container_name: gitea + restart: unless-stopped + depends_on: + db: + condition: service_healthy + environment: + USER_UID: 1000 + USER_GID: 1000 + # ---- URLs / proxy (Traefik) ---- + GITEA__server__DOMAIN: git.goutailler-olivier.com + GITEA__server__ROOT_URL: https://git.goutailler-olivier.com/ + GITEA__server__HTTP_PORT: "3000" + + # ---- SSH (optionnel) ---- + # Laisse l’SSH intégré de Gitea activé et expose un port hôte 2222 (voir plus bas) + GITEA__server__SSH_DOMAIN: git.goutailler-olivier.com + GITEA__server__START_SSH_SERVER: "true" + GITEA__server__SSH_PORT: "2222" + GITEA__server__SSH_LISTEN_PORT: "2222" + + # ---- Base de données ---- + GITEA__database__DB_TYPE: postgres + GITEA__database__HOST: db:5432 + GITEA__database__NAME: gitea + GITEA__database__USER: gitea + GITEA__database__PASSWD: change_me + + TZ: Europe/Paris + volumes: + - ./gitea:/data + # (facultatif) pour horloge locale dans les logs : + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + + # Pas d'exposition du port HTTP: Traefik s'en charge + # On expose seulement l'SSH si tu veux cloner/pusher en SSH + networks: + - gitea-net + - proxy + labels: + - traefik.enable=true + - traefik.http.routers.gitea.rule=Host(`git.goutailler-olivier.com`) + - traefik.http.routers.gitea.entrypoints=websecure + - traefik.http.routers.gitea.tls.certresolver=le + - traefik.http.services.gitea.loadbalancer.server.port=3000 + - traefik.docker.network=proxy + + # SSH (TCP router) + - traefik.tcp.routers.gitea-ssh.rule=HostSNI(`*`) + - traefik.tcp.routers.gitea-ssh.tls=false + - traefik.tcp.routers.gitea-ssh.entrypoints=ssh + - traefik.tcp.routers.gitea-ssh.service=gitea-ssh + - traefik.tcp.services.gitea-ssh.loadbalancer.server.port=2222 + + act_runner: + build: + context: . + dockerfile: Dockerfile.runner + extra_hosts: + - "git.goutailler-olivier.com:host-gateway" + container_name: gitea-runner + restart: unless-stopped + depends_on: + - gitea + environment: + GITEA_INSTANCE_URL: http://gitea:3000 + GITEA_RUNNER_REGISTRATION_TOKEN: IZM8wKkzR4XZogOxsb5or3JKiugXyguFtA0zjNWZ + GITEA_RUNNER_NAME: docker-runner + GITEA_RUNNER_LABELS: ubuntu-latest:host + CONFIG_FILE: /config.yaml + GITEA__actions__ENABLED: "true" + GITEA__actions__DEFAULT_ACTIONS_URL: http://gitea:3000 + volumes: + - ./runner_data:/data + - ./runner_data/config.yaml:/config.yaml + - /var/run/docker.sock:/var/run/docker.sock + - /opt/backups:/opt/backups + networks: + - gitea-net + +networks: + gitea-net: + driver: bridge + proxy: + external: true + name: proxy