diff --git a/active/podman_gitea/gitea-compose.yaml b/active/podman_gitea/gitea-compose.yaml new file mode 100644 index 0000000..1297c60 --- /dev/null +++ b/active/podman_gitea/gitea-compose.yaml @@ -0,0 +1,41 @@ +networks: + gitea: + external: false + +services: + server: + image: docker.gitea.com/gitea:1.25.3 + container_name: gitea + environment: + - USER_UID=1001 + - USER_GID=1001 + - GITEA__database__DB_TYPE=postgres + - GITEA__database__HOST=db:5432 + - GITEA__database__NAME=gitea + - GITEA__database__USER=gitea + - GITEA__database__PASSWD=gitea + restart: always + networks: + - gitea + volumes: + - /srv/gitea-data/data:/data + - /srv/gitea-data/custom:/var/lib/gitea/custom + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + ports: + - "3000:3000" + - "2222:22" + depends_on: + - db + + db: + image: docker.io/library/postgres:15 + restart: always + environment: + - POSTGRES_USER=gitea + - POSTGRES_PASSWORD=gitea + - POSTGRES_DB=gitea + networks: + - gitea + volumes: + - /srv/gitea-db/postgres:/var/lib/postgresql/data \ No newline at end of file diff --git a/active/podman_gitea/gitea.md b/active/podman_gitea/gitea.md index abbd638..158ada6 100644 --- a/active/podman_gitea/gitea.md +++ b/active/podman_gitea/gitea.md @@ -1,6 +1,7 @@ # Gitea - [Gitea](#gitea) + - [Gitea on Docker](#gitea-on-docker) - [Gitea on Rootless Podman](#gitea-on-rootless-podman) - [A note on directories](#a-note-on-directories) - [Create the gitea user](#create-the-gitea-user) @@ -14,6 +15,20 @@ - [Cache Cleanup](#cache-cleanup) - [Email Notifications](#email-notifications) +## Gitea on Docker + + + +Prereqs + +1. Mount data dirs at `/srv/gitea-data` and `/srv/gitea-db` +2. Create a gitea user and update gitea-compose.yaml with the correct UID + +```bash +scp active/podman_gitea/gitea-compose.yaml gitea: +docker compose -f gitea-compose.yaml up -d +``` + ## Gitea on Rootless Podman ### A note on directories @@ -141,8 +156,6 @@ you have. ### Install ```bash -touch config.yaml - export GITEA_TOKEN= docker run \ -v /var/run/docker.sock:/var/run/docker.sock \ @@ -197,6 +210,10 @@ docker builder prune -a To run it every day at noon: `crontab -e` +```bash +dnf install cronie cronie-anacron +``` + ```bash 0 12 * * * yes | docker builder prune -a 0 12 * * * docker image prune -a -f