Go to file
2024-12-02 11:33:06 +01:00
manifests fix(backups): Move to 6 char cron values, making the backup once a day at midnight 2024-12-02 11:33:06 +01:00
docker-compose.yml feat(*): Add docker-compose file 2023-06-30 13:11:27 +02:00
README.md feat: Upgrade version and add SSL certificate 2024-11-27 13:43:28 +01:00

Gitea

Front end for Git, with integrated Container Registry and CI/CD capabilities. This repository only contains configuration used for Kubernetes.

From Docker to Gitea

Get a dump of your current Docker instance:

gitea dump -c /data/gitea/conf/app.ini

In this context, my /data path is mounted to the host.

Then modify the deployment.yaml file to only start a "sleeping" container:

[...]
image: gitea/gitea:1.22.3
ports:
  - containerPort: 3000
command: ["/bin/sh", "-c", "sleep 1000000000"] # Add this line
env:
  - name: GITEA__database__DB_TYPE
    value: "postgres"
[...]

Then, copy the dump to the container:

kubectl cp <dump file> <namespace>/<pod name>:/data/dump

Get into the pod and go as follows.

Unzip the dump

unzip <dump file>

Then, restore the dump

mv repo/* /data/git/repositories
mv lfs/* /data/git/lfs
mv data/* /data/gitea

And finally, restore the database

PGPASSWORD=$GITEA__database__PASSWD psql -h gitea-db-rw.gitea.svc.cluster.local -U $GITEA__database__USER < halis_gitea.sql