chore: replace gitea with forgejo

This commit is contained in:
BatchAccount 1001 2024-12-25 19:58:14 +01:00
parent 3fa63807eb
commit 1a601e3ab0
3 changed files with 30 additions and 27 deletions

View file

@ -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

View file

@ -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

View file

@ -1,16 +1,17 @@
version: "3.0" ---
networks: networks:
gitea: forgejo:
external: false external: false
services: services:
server: server:
image: gitea/gitea:1.21.5 image: codeberg.org/forgejo/forgejo:9.0.3
restart: always restart: always
environment: environment:
USER_UID: 1000 USER_UID: 1000
USER_GID: 1000 USER_GID: 1000
GITEA____APP_NAME: JILITS Git
GITEA____APP_SLOGAN: Cloud Solutions with Integrity
GITEA__database__DB_TYPE: postgres GITEA__database__DB_TYPE: postgres
GITEA__database__HOST: db:5432 GITEA__database__HOST: db:5432
GITEA__database__NAME: ${POSTGRES_DB} GITEA__database__NAME: ${POSTGRES_DB}
@ -24,16 +25,18 @@ services:
GITEA__service__DISABLE_REGISTRATION: "true" GITEA__service__DISABLE_REGISTRATION: "true"
GITEA__service__NO_REPLY_ADDRESS: noreply.git.jilits.se GITEA__service__NO_REPLY_ADDRESS: noreply.git.jilits.se
GITEA__mailer__ENABLED: "true" GITEA__mailer__ENABLED: "true"
GITEA__mailer__MAILER_TYPE: smtp GITEA__mailer__PROTOCOL: smtp
GITEA__mailer__HOST: mail.jilits.se:587 GITEA__mailer__SMTP_ADDR: mail.jilits.se
GITEA__mailer__FROM: Gitea <git@jilits.se> GITEA__mailer__SMTP_PORT: 587
GITEA__mailer__FROM: Forgejo <git@jilits.se>
GITEA__mailer__USER: ${SMTP_USER} GITEA__mailer__USER: ${SMTP_USER}
GITEA__mailer__PASSWD: ${SMTP_PASS} 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: networks:
- gitea - forgejo
volumes: volumes:
- gitea:/data - forgejo:/data
- /etc/timezone:/etc/timezone:ro - /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
ports: ports:
@ -50,10 +53,10 @@ services:
POSTGRES_USER: ${POSTGRES_USER} POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
networks: networks:
- gitea - forgejo
volumes: volumes:
- db:/var/lib/postgresql/data - db:/var/lib/postgresql/data
volumes: volumes:
gitea: forgejo:
db: db: