From fe763d68ffa012e78a1a9d9a237bbd2620d80b3b Mon Sep 17 00:00:00 2001 From: Matthew McKinnon Date: Wed, 12 Nov 2025 13:11:03 +1000 Subject: [PATCH] chore: disable auto update --- tasks/gitea.yml | 85 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 tasks/gitea.yml diff --git a/tasks/gitea.yml b/tasks/gitea.yml new file mode 100644 index 0000000..1671c45 --- /dev/null +++ b/tasks/gitea.yml @@ -0,0 +1,85 @@ +--- +- name: Create directories + file: + path: "{{ item }}" + state: directory + with_items: + - "/data/gitea" + - "/data/gitea/data" + - "/data/gitea/db" + +- name: Create MySQL DB for Gitea + docker_container: + name: gitea_db + image: mysql:9 + restart_policy: unless-stopped + networks: + - name: proxy + env: + MYSQL_ROOT_PASSWORD: "{{ gitea_db_root_password }}" + MYSQL_USER: "{{ gitea_db_user }}" + MYSQL_PASSWORD: "{{ gitea_db_password }}" + MYSQL_DATABASE: gitea + volumes: + - "/data/gitea/db:/var/lib/mysql" + pull: true + recreate: true + +- name: Create the Gitea container + docker_container: + name: gitea + image: gitea/gitea:1.25 + restart_policy: unless-stopped + networks: + - name: proxy + ports: + - "2222:22" + env: + PUID: "1001" + PGID: "1001" + TZ: "Australia/Brisbane" + volumes: + - "/data/gitea/data:/data" + - "/etc/timezone:/etc/timezone:ro" + - "/etc/localtime:/etc/localtime:ro" + labels: + traefik.enable: "true" + traefik.http.routers.gitea.rule: "Host(`git.comprofix.com`)" + traefik.http.routers.gitea.entrypoints: "https" + traefik.http.routers.gitea.tls: "true" + traefik.http.routers.gitea.service: "gitea" + traefik.http.services.gitea.loadbalancer.server.port: "3000" + pull: true + recreate: true + +- name: Create directories + file: + path: "{{ item }}" + state: directory + with_items: + - "/data/opengist" + +- name: Create the opengist container + docker_container: + name: opengist + image: ghcr.io/thomiceli/opengist:1.11 + restart_policy: unless-stopped + networks: + - name: proxy + volumes: + - "/data/opengist:/opengist" + env: + OG_GITEA_CLIENT_KEY: "{{ OG_GITEA_KEY }}" + OG_GITEA_SECRET: "{{ OG_GITEA_SECRET }}" + # URL of the Gitea instance. Default: https://gitea.com/ + OG_GITEA_URL: "https://git.comprofix.com" + PUID: "1000" + PGID: "1000" + TZ: "Australia/Brisbane" + labels: + traefik.enable: "true" + traefik.http.routers.opengist.rule: "Host(`gist.comprofix.com`)" + traefik.http.routers.opengist.entrypoints: "https" + traefik.http.routers.opengist.tls: "true" + traefik.http.routers.opengist.service: "opengist" + traefik.http.services.opengist.loadbalancer.server.port: "6157"