gitea. Migrating to Forgejo.

This commit is contained in:
Alexey Skobkin 2024-02-23 02:10:59 +03:00
parent 86556f4f96
commit 32e21ddc4f
No known key found for this signature in database
GPG Key ID: 5D5CEF6F221278E7
8 changed files with 69 additions and 67 deletions

View File

@ -41,8 +41,8 @@ Not every stack is tested to fully work.
| Element-web | ✅ | `vectorim/element-web` | Web Matrix client. | [Website](https://element.io), [Github](https://github.com/vector-im/element-web/) |
| emby | ✅ | `emby/embyserver` | Media server with online transcoding support. | [Website](https://emby.media) |
| Folding@Home | ✅ | `johnktims/folding-at-home` | Protein folding distributed computing platform. | [Website](https://foldingathome.org), [My guide](https://skobk.in/2020/06/folding-at-home-quick-start/) |
| Forgejo | ✅ | `codeberg.org/forgejo/forgejo` | Lightweight Git hosting platform. | [Website](https://forgejo.org), [Github](https://codeberg.org/forgejo/forgejo) |
| Gatus | ✅ | `twinproduction/gatus` | Advanced service(s) status page. | [Website](https://gatus.io), [Github](https://github.com/TwiN/gatus) |
| Gitea | ✅ | `gitea/gitea` | Lightweight Git hosting platfom. | [Website](https://gitea.io/), [Github](https://github.com/go-gitea/gitea) |
| Home Assistant | ✅ | `ghcr.io/home-assistant/home-assistant` | Home automation suite. | [Website](https://www.home-assistant.io/), [Github](https://github.com/home-assistant) |
| Homer | ✅ | `b4bz/homer` | Server homepage generator. | [Github](https://github.com/bastienwirtz/homer), [Demo](https://homer-demo.netlify.app), [Configuration](https://github.com/bastienwirtz/homer/blob/main/docs/configuration.md) |
| I2PD | ✅ | `purplei2p/i2pd` | The Invisible Internet router. | [Website](https://i2pd.website), [Github](https://github.com/PurpleI2P/i2pd/), [I2P project](https://geti2p.net/) |

View File

@ -1,7 +1,9 @@
# see https://docs.gitea.io/en-us/install-with-docker/
# see https://forgejo.org/docs/latest/admin/installation-docker/
USER_UID=1000
USER_GID=1000
IMAGE_TAG=1.21
HOST_DATA_DIR=./data
HOST_PG_DATA_DIR=./db
HTTP_BIND_ADDR=127.0.0.1
@ -12,9 +14,9 @@ EXT_SSH_PORT=222
# Leave default for embedded database
DB_HOST=db
DB_PORT=5432
DB_NAME=gitea
DB_USER=gitea
DB_PASSWD=gitea
DB_NAME=forgejo
DB_USER=forgejo
DB_PASSWD=forgejo
LOG_MAX_SIZE=5m
LOG_MAX_FILE=5

View File

@ -0,0 +1,21 @@
version: '3.7'
services:
server:
image: "codeberg.org/forgejo/forgejo:${IMAGE_TAG:-1.21}"
container_name: forgejo
restart: unless-stopped
network_mode: host
ports:
- "${HTTP_BIND_ADDR:-127.0.0.1}:${EXT_HTTP_PORT:-3000}:3000"
- "${EXT_SSH_PORT:-222}:22"
volumes:
- "${HOST_DATA_DIR:-./data}:/data"
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- "FORGEJO__database__DB_TYPE=postgres"
- "FORGEJO__database__HOST=${DB_HOST:-db}:${DB_PORT:-5432}"
- "FORGEJO__database__NAME=${DB_NAME:-forgejo}"
- "FORGEJO__database__USER=${DB_USER:-forgejo}"
- "FORGEJO__database__PASSWD=${DB_PASSWD:-forgejo}"

View File

@ -0,0 +1,40 @@
version: '3.7'
networks:
forgejo:
external: false
services:
server:
image: "codeberg.org/forgejo/forgejo:${IMAGE_TAG:-1.21}"
container_name: forgejo
depends_on:
- db
restart: unless-stopped
networks:
- forgejo
ports:
- "${HTTP_BIND_ADDR:-127.0.0.1}:${EXT_HTTP_PORT:-3000}:3000"
- "${EXT_SSH_PORT:-222}:22"
volumes:
- "${HOST_DATA_DIR:-./data}:/data"
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- "FORGEJO__database__DB_TYPE=postgres"
- "FORGEJO__database__HOST=${DB_HOST:-db}:${DB_PORT:-5432}"
- "FORGEJO__database__NAME=${DB_NAME:-forgejo}"
- "FORGEJO__database__USER=${DB_USER:-forgejo}"
- "FORGEJO__database__PASSWD=${DB_PASSWD:-forgejo}"
db:
image: postgres:13
restart: unless-stopped
environment:
- "POSTGRES_USER=${DB_USER:-forgejo}"
- "POSTGRES_PASSWORD=${DB_PASSWD:-forgejo}"
- "POSTGRES_DB=${DB_NAME:-forgejo}"
networks:
- forgejo
volumes:
- "${HOST_PG_DATA_DIR:-./db}:/var/lib/postgresql/data"

View File

@ -20,4 +20,4 @@ server {
# SSL config
#include ssl/domain.tld.conf;
}
}

View File

@ -1,21 +0,0 @@
version: '3.7'
services:
server:
image: gitea/gitea:latest
container_name: gitea
restart: unless-stopped
network_mode: host
ports:
- "${HTTP_BIND_ADDR:-127.0.0.1}:${EXT_HTTP_PORT:-3000}:3000"
- "${EXT_SSH_PORT:-222}:22"
volumes:
- "${HOST_DATA_DIR:-./data}:/data"
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- GITEA__database__DB_TYPE=postgres
- "GITEA__database__HOST=${DB_HOST:-db}:${DB_PORT:-5432}"
- "GITEA__database__NAME=${DB_NAME:-gitea}"
- "GITEA__database__USER=${DB_USER:-gitea}"
- "GITEA__database__PASSWD=${DB_PASSWD:-gitea}"

View File

@ -1,40 +0,0 @@
version: '3.7'
networks:
gitea:
external: false
services:
server:
image: gitea/gitea:latest
container_name: gitea
depends_on:
- db
restart: unless-stopped
networks:
- gitea
ports:
- "${HTTP_BIND_ADDR:-127.0.0.1}:${EXT_HTTP_PORT:-3000}:3000"
- "${EXT_SSH_PORT:-222}:22"
volumes:
- "${HOST_DATA_DIR:-./data}:/data"
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- GITEA__database__DB_TYPE=postgres
- "GITEA__database__HOST=${DB_HOST:-db}:${DB_PORT:-5432}"
- "GITEA__database__NAME=${DB_NAME:-gitea}"
- "GITEA__database__USER=${DB_USER:-gitea}"
- "GITEA__database__PASSWD=${DB_PASSWD:-gitea}"
db:
image: postgres:13
restart: unless-stopped
environment:
- "POSTGRES_USER=${DB_USER:-gitea}"
- "POSTGRES_PASSWORD=${DB_PASSWD:-gitea}"
- "POSTGRES_DB=${DB_NAME:-gitea}"
networks:
- gitea
volumes:
- "${HOST_PG_DATA_DIR:-./db}:/var/lib/postgresql/data"