Add Go implementation: main.go, Dockerfile, docker-compose.yml

This commit is contained in:
lyn
2026-04-14 13:21:08 +00:00
parent 0a2ec1d048
commit 55f87b13f4
4 changed files with 380 additions and 0 deletions

26
docker-compose.yml Normal file
View File

@@ -0,0 +1,26 @@
services:
gitea-custom-api:
build: .
container_name: gitea-custom-api
restart: unless-stopped
environment:
DB_HOST: mysql
DB_USER: root
DB_PASS: ${MYSQL_ROOT_PASSWORD}
DB_NAME: giteadb
API_KEY_FILE: /data/api-key
WEBHOOK_SECRET: ${GITEA_WEBHOOK_SECRET}
PORT: "8080"
volumes:
- ./api-key:/data/api-key
networks:
- git-network
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
networks:
git-network:
external: true