add gitea docker install
This commit is contained in:
41
active/podman_gitea/gitea-compose.yaml
Normal file
41
active/podman_gitea/gitea-compose.yaml
Normal file
@@ -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
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
# Gitea
|
# Gitea
|
||||||
|
|
||||||
- [Gitea](#gitea)
|
- [Gitea](#gitea)
|
||||||
|
- [Gitea on Docker](#gitea-on-docker)
|
||||||
- [Gitea on Rootless Podman](#gitea-on-rootless-podman)
|
- [Gitea on Rootless Podman](#gitea-on-rootless-podman)
|
||||||
- [A note on directories](#a-note-on-directories)
|
- [A note on directories](#a-note-on-directories)
|
||||||
- [Create the gitea user](#create-the-gitea-user)
|
- [Create the gitea user](#create-the-gitea-user)
|
||||||
@@ -14,6 +15,20 @@
|
|||||||
- [Cache Cleanup](#cache-cleanup)
|
- [Cache Cleanup](#cache-cleanup)
|
||||||
- [Email Notifications](#email-notifications)
|
- [Email Notifications](#email-notifications)
|
||||||
|
|
||||||
|
## Gitea on Docker
|
||||||
|
|
||||||
|
<https://docs.gitea.com/installation/install-with-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
|
## Gitea on Rootless Podman
|
||||||
|
|
||||||
### A note on directories
|
### A note on directories
|
||||||
@@ -141,8 +156,6 @@ you have.
|
|||||||
### Install
|
### Install
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
touch config.yaml
|
|
||||||
|
|
||||||
export GITEA_TOKEN=
|
export GITEA_TOKEN=
|
||||||
docker run \
|
docker run \
|
||||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
-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`
|
To run it every day at noon: `crontab -e`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
dnf install cronie cronie-anacron
|
||||||
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
0 12 * * * yes | docker builder prune -a
|
0 12 * * * yes | docker builder prune -a
|
||||||
0 12 * * * docker image prune -a -f
|
0 12 * * * docker image prune -a -f
|
||||||
|
|||||||
Reference in New Issue
Block a user