Compare commits
No commits in common. "f8346fbe7bb142f113127e1159998cc2ace6ef51" and "fc49a6f412afadea311b0e6bafc8ec1967b16c2a" have entirely different histories.
f8346fbe7b
...
fc49a6f412
44
README.md
44
README.md
@ -3,47 +3,3 @@
|
||||
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:
|
||||
```bash
|
||||
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:
|
||||
```yaml
|
||||
[...]
|
||||
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:
|
||||
```bash
|
||||
kubectl cp <dump file> <namespace>/<pod name>:/data/dump
|
||||
```
|
||||
|
||||
Get into the pod and go as follows.
|
||||
|
||||
Unzip the dump
|
||||
```bash
|
||||
unzip <dump file>
|
||||
```
|
||||
|
||||
Then, restore the dump
|
||||
```bash
|
||||
mv repo/* /data/git/repositories
|
||||
mv lfs/* /data/git/lfs
|
||||
mv data/* /data/gitea
|
||||
```
|
||||
|
||||
And finally, restore the database
|
||||
```bash
|
||||
PGPASSWORD=$GITEA__database_PASSWD psql -h $GITEA__database_HOST -U $GITEA__database_USER < gitea-db.sql
|
||||
```
|
||||
|
@ -4,15 +4,13 @@ metadata:
|
||||
name: gitea-config
|
||||
namespace: gitea
|
||||
data:
|
||||
APP_NAME: Halis hosted git solution
|
||||
APP_NAME: Halia hosted git solution
|
||||
RUN_MODE: prod
|
||||
GITEA__server__DISABLE_SSH: "true"
|
||||
GITEA__server__ROOT_URL: "https://git.halis.io"
|
||||
GITEA__server__ROOT_URL: "https://git.beta.halia.dev"
|
||||
GITEA__security__INSTALL_LOCK: "true"
|
||||
GITEA__service__DISABLE_REGISTRATION: "true"
|
||||
GITEA__metrics__ENABLED: "true"
|
||||
GITEA__queue__TYPE: "level"
|
||||
#GITEA__indexer__REPO_INDEXER_ENABLED: "false"
|
||||
#app.ini: |
|
||||
# APP_NAME = K8s implementation
|
||||
# RUN_MODE = prod
|
||||
|
@ -9,7 +9,7 @@ spec:
|
||||
|
||||
storage:
|
||||
size: 1Gi
|
||||
storageClass: redundant-storage-class
|
||||
storageClass: flat-storage-class
|
||||
|
||||
bootstrap:
|
||||
initdb:
|
||||
|
@ -4,7 +4,7 @@ metadata:
|
||||
name: gitea
|
||||
namespace: gitea
|
||||
spec:
|
||||
replicas: 1
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: gitea
|
||||
@ -17,9 +17,13 @@ spec:
|
||||
subdomain: gitea
|
||||
containers:
|
||||
- name: gitea
|
||||
image: gitea/gitea:1.22.3
|
||||
image: gitea/gitea:1.19.3
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
lifecycle:
|
||||
postStart:
|
||||
exec:
|
||||
command: ["sh", "-c", "sleep 1 && su git -c 'sh /admin-creator.sh'"]
|
||||
env:
|
||||
- name: GITEA__database__DB_TYPE
|
||||
value: "postgres"
|
||||
|
@ -20,12 +20,10 @@ spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`git.halis.io`) && PathPrefix(`/`)
|
||||
- match: Host(`git.beta.halia.dev`) && PathPrefix(`/`)
|
||||
kind: Rule
|
||||
middlewares:
|
||||
- name: replace-regex
|
||||
services:
|
||||
- name: gitea-svc
|
||||
port: 80
|
||||
tls:
|
||||
certResolver: letsencrypt
|
||||
|
@ -5,8 +5,8 @@ metadata:
|
||||
namespace: gitea
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 15Gi
|
||||
storageClassName: redundant-storage-class
|
||||
storage: 5Gi
|
||||
storageClassName: flat-storage-class
|
||||
|
@ -8,8 +8,8 @@ metadata:
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://git.halia.dev/athens-school/k3s-secrets.git
|
||||
targetRevision: prod-migration
|
||||
repoURL: https://git.halis.io/athens-school/k3s-secrets.git
|
||||
targetRevision: dev
|
||||
path: gitea
|
||||
syncPolicy:
|
||||
automated:
|
||||
|
Loading…
Reference in New Issue
Block a user