From 1a601e3ab09f50babf161f2358e98ca4d643c6b9 Mon Sep 17 00:00:00 2001 From: BA1001 Date: Wed, 25 Dec 2024 19:58:14 +0100 Subject: [PATCH] chore: replace gitea with forgejo --- etc/systemd/system/forgejo-dc.service | 15 +++++++++++++ etc/systemd/system/gitea-dc.service | 15 ------------- opt/{gitea => forgejo}/docker-compose.yml | 27 +++++++++++++---------- 3 files changed, 30 insertions(+), 27 deletions(-) create mode 100644 etc/systemd/system/forgejo-dc.service delete mode 100644 etc/systemd/system/gitea-dc.service rename opt/{gitea => forgejo}/docker-compose.yml (72%) diff --git a/etc/systemd/system/forgejo-dc.service b/etc/systemd/system/forgejo-dc.service new file mode 100644 index 0000000..b846f54 --- /dev/null +++ b/etc/systemd/system/forgejo-dc.service @@ -0,0 +1,15 @@ +[Unit] +Description=Forgejo (Compose Service) +Requires=docker.service +After=docker.service + +[Service] +WorkingDirectory=/opt/forgejo +ExecStart=/usr/bin/docker compose --project-name forgejo up +ExecStop=/usr/bin/docker compose --project-name forgejo down +TimeoutStartSec=0 +Restart=on-failure +StartLimitBurst=3 + +[Install] +WantedBy=multi-user.target diff --git a/etc/systemd/system/gitea-dc.service b/etc/systemd/system/gitea-dc.service deleted file mode 100644 index c09bbc9..0000000 --- a/etc/systemd/system/gitea-dc.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=Gitea (Compose Service) -Requires=docker.service -After=docker.service - -[Service] -WorkingDirectory=/opt/gitea -ExecStart=/usr/bin/docker-compose --project-name gitea up -ExecStop=/usr/bin/docker-compose --project-name gitea down -TimeoutStartSec=0 -Restart=on-failure -StartLimitBurst=3 - -[Install] -WantedBy=multi-user.target diff --git a/opt/gitea/docker-compose.yml b/opt/forgejo/docker-compose.yml similarity index 72% rename from opt/gitea/docker-compose.yml rename to opt/forgejo/docker-compose.yml index e4ed6e5..7aefb4a 100644 --- a/opt/gitea/docker-compose.yml +++ b/opt/forgejo/docker-compose.yml @@ -1,16 +1,17 @@ -version: "3.0" - +--- networks: - gitea: + forgejo: external: false services: server: - image: gitea/gitea:1.21.5 + image: codeberg.org/forgejo/forgejo:9.0.3 restart: always environment: USER_UID: 1000 USER_GID: 1000 + GITEA____APP_NAME: JILITS Git + GITEA____APP_SLOGAN: Cloud Solutions with Integrity GITEA__database__DB_TYPE: postgres GITEA__database__HOST: db:5432 GITEA__database__NAME: ${POSTGRES_DB} @@ -24,16 +25,18 @@ services: GITEA__service__DISABLE_REGISTRATION: "true" GITEA__service__NO_REPLY_ADDRESS: noreply.git.jilits.se GITEA__mailer__ENABLED: "true" - GITEA__mailer__MAILER_TYPE: smtp - GITEA__mailer__HOST: mail.jilits.se:587 - GITEA__mailer__FROM: Gitea + GITEA__mailer__PROTOCOL: smtp + GITEA__mailer__SMTP_ADDR: mail.jilits.se + GITEA__mailer__SMTP_PORT: 587 + GITEA__mailer__FROM: Forgejo GITEA__mailer__USER: ${SMTP_USER} GITEA__mailer__PASSWD: ${SMTP_PASS} - GITEA__time__FORMAT: "2006-01-02 15:04:05" + GITEA__time__FORMAT: "2007-01-02 15:04:05" + GITEA__other__SHOW_FOOTER_VERSION: "false" networks: - - gitea + - forgejo volumes: - - gitea:/data + - forgejo:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro ports: @@ -50,10 +53,10 @@ services: POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} networks: - - gitea + - forgejo volumes: - db:/var/lib/postgresql/data volumes: - gitea: + forgejo: db: