feat: add minio as gitea storage

This commit is contained in:
2025-10-27 21:47:52 +01:00
parent 450ae77453
commit 098680e243

View File

@@ -16,6 +16,12 @@ services:
- GITEA__server__SSH_LISTEN_PORT=22 - GITEA__server__SSH_LISTEN_PORT=22
- GITEA__server__SSH_DOMAIN=git.hashdot.co - GITEA__server__SSH_DOMAIN=git.hashdot.co
- GITEA__server__DOMAIN=git.hashdot.co - GITEA__server__DOMAIN=git.hashdot.co
- GITEA__storage__STORAGE_TYPE=minio
- GITEA__storage__MINIO_ENDPOINT=gitea-minio:9000
- GITEA__storage__MINIO_ACCESS_KEY_ID=gitea
- GITEA__storage__MINIO_SECRET_ACCESS_KEY=gitea_minio_secret
- GITEA__storage__MINIO_BUCKET=gitea
- GITEA__storage__MINIO_USE_SSL=false
restart: always restart: always
networks: networks:
- gitea - gitea
@@ -27,7 +33,10 @@ services:
- "3000:3000" - "3000:3000"
- "2222:22" - "2222:22"
depends_on: depends_on:
- gitea-db gitea-db:
condition: service_started
gitea-minio:
condition: service_healthy
gitea-db: gitea-db:
image: docker.io/library/postgres:14 image: docker.io/library/postgres:14
@@ -58,6 +67,24 @@ services:
- gitea-runner-data:/data:rw - gitea-runner-data:/data:rw
- gitea-runner-certs:/certs - gitea-runner-certs:/certs
gitea-minio:
image: quay.io/minio/minio:latest
container_name: gitea-minio
restart: always
environment:
- MINIO_ROOT_USER=gitea
- MINIO_ROOT_PASSWORD=gitea_minio_secret
command: server /data --console-address ":9001"
networks:
- gitea
volumes:
- minio-data:/data
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 5s
timeout: 5s
retries: 5
networks: networks:
gitea: gitea:
@@ -67,4 +94,5 @@ volumes:
gitea-runner-certs: gitea-runner-certs:
gitea-runner-data: gitea-runner-data:
gitea-database: gitea-database:
gitea-data: gitea-data:
minio-data: