From e68029086f8b9a756d3b27343b30b2919e0fa497 Mon Sep 17 00:00:00 2001 From: AnthonyAxenov Date: Sat, 7 Jun 2025 16:01:13 +0800 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B0=D0=BD=D0=BD=D0=B5=D1=80=20=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=D0=BC=D0=B5=D1=89=D1=91=D0=BD=20=D0=B2=20ove?= =?UTF-8?q?rride.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compose.override.yml.example | 40 +++++++++++++++++++++++++++--------- compose.yml | 15 -------------- 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/compose.override.yml.example b/compose.override.yml.example index 9445946..2ea54cd 100644 --- a/compose.override.yml.example +++ b/compose.override.yml.example @@ -1,14 +1,34 @@ -################################################ -# Rename this file to compose.override.yml if -# you need to restore database backups. Also -# you can override another settings here. -################################################ +x-common-attributes: &common-attributes + env_file: .env + restart: unless-stopped + networks: [network] + volumes: + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro services: - gitea-db: - volumes: - - ./gitea/dump.sql.gz:/docker-entrypoint-initdb.d/dump.sql.gz + # uncomment to import gitea database backup on first start + # gitea-db: + # volumes: + # - ./gitea/dump.sql.gz:/docker-entrypoint-initdb.d/dump.sql.gz - opengist-db: + # uncomment to import opengist database backup on first start + # opengist-db: + # volumes: + # - ./opengist/dump.sql.gz:/docker-entrypoint-initdb.d/dump.sql.gz + + # uncomment to use gitea runner + gitea-runner: + <<: *common-attributes + container_name: gitea-runner + image: docker.io/gitea/act_runner:latest + environment: + CONFIG_FILE: /config.yaml + GITEA_INSTANCE_URL: http://gitea:3000 + GITEA_RUNNER_REGISTRATION_TOKEN: ${RUNNER_REG_TOKEN} + GITEA_RUNNER_NAME: gitea-runner + # GITEA_RUNNER_LABELS: ${RUNNER_LABELS} volumes: - - ./opengist/dump.sql.gz:/docker-entrypoint-initdb.d/dump.sql.gz + - ./runner/config.yaml:/config.yaml + - ./runner/data:/data + - /var/run/docker.sock:/var/run/docker.sock diff --git a/compose.yml b/compose.yml index e717b6e..dd92a98 100644 --- a/compose.yml +++ b/compose.yml @@ -36,21 +36,6 @@ services: depends_on: - gitea-db - gitea-runner: - <<: *common-attributes - container_name: gitea-runner - image: docker.io/gitea/act_runner:latest - environment: - CONFIG_FILE: /config.yaml - GITEA_INSTANCE_URL: http://gitea:3000 - GITEA_RUNNER_REGISTRATION_TOKEN: ${RUNNER_REG_TOKEN} - GITEA_RUNNER_NAME: gitea-runner - # GITEA_RUNNER_LABELS: ${RUNNER_LABELS} - volumes: - - ./runner/config.yaml:/config.yaml - - ./runner/data:/data - - /var/run/docker.sock:/var/run/docker.sock - gitea-db: <<: *common-attributes container_name: gitea-db