Tots els compose
This commit is contained in:
83
gitea/docker-compose.yml
Normal file
83
gitea/docker-compose.yml
Normal file
@@ -0,0 +1,83 @@
|
||||
# /opt/stacks/gitea/docker-compose.yml
|
||||
|
||||
services:
|
||||
|
||||
# ── MariaDB ──────────────────────────────
|
||||
db:
|
||||
container_name: gitea-db
|
||||
image: mariadb:10.11
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
TZ: Europe/Madrid
|
||||
MYSQL_ROOT_PASSWORD: '${MYSQL_ROOT_PASSWORD}'
|
||||
MYSQL_DATABASE: gitea
|
||||
MYSQL_USER: gitea
|
||||
MYSQL_PASSWORD: '${MYSQL_PASSWORD}'
|
||||
volumes:
|
||||
- gitea_db:/var/lib/mysql
|
||||
healthcheck:
|
||||
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
networks: [gitea_net]
|
||||
|
||||
# ── Gitea ────────────────────────────────
|
||||
gitea:
|
||||
container_name: gitea
|
||||
image: gitea/gitea:1 # Pinnat a major version — evita trencaments per latest
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
TZ: Europe/Madrid # Substitueix els bind mounts de timezone
|
||||
USER_UID: 1000
|
||||
USER_GID: 1000
|
||||
# Connexió a MariaDB
|
||||
GITEA__database__DB_TYPE: mysql
|
||||
GITEA__database__HOST: db:3306
|
||||
GITEA__database__NAME: gitea
|
||||
GITEA__database__USER: gitea
|
||||
GITEA__database__PASSWD: '${MYSQL_PASSWORD}'
|
||||
# URL pública (obligatori per a clons SSH i web)
|
||||
GITEA__server__ROOT_URL: 'https://git.domini.com/'
|
||||
GITEA__server__SSH_DOMAIN: git.domini.com
|
||||
GITEA__server__SSH_PORT: 2222
|
||||
GITEA__server__DOMAIN: git.domini.com
|
||||
# Desactiva el registre públic
|
||||
GITEA__service__DISABLE_REGISTRATION: 'true'
|
||||
# Seguretat
|
||||
GITEA__security__SECRET_KEY: '${GITEA_SECRET_KEY}'
|
||||
GITEA__security__INTERNAL_TOKEN: '${GITEA_INTERNAL_TOKEN}'
|
||||
# Mailer — descomenta i configura per a notificacions per email
|
||||
# GITEA__mailer__ENABLED: 'true'
|
||||
# GITEA__mailer__SMTP_ADDR: mail.domini.com
|
||||
# GITEA__mailer__SMTP_PORT: '587'
|
||||
# GITEA__mailer__USER: '${GITEA_SMTP_USER}'
|
||||
# GITEA__mailer__PASSWD: '${GITEA_SMTP_PASSWORD}'
|
||||
# GITEA__mailer__FROM: 'Gitea <gitea@domini.com>'
|
||||
volumes:
|
||||
- gitea_data:/data
|
||||
ports:
|
||||
- "3000:3000" # Web UI → via Nginx Proxy Manager
|
||||
- "2222:22" # SSH públic — necessari per a git push/pull directe
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3000"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 60s
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
networks: [gitea_net, shared_net]
|
||||
|
||||
volumes:
|
||||
gitea_db:
|
||||
gitea_data:
|
||||
|
||||
networks:
|
||||
gitea_net:
|
||||
driver: bridge
|
||||
shared_net:
|
||||
external: true
|
||||
name: shared_net
|
||||
Reference in New Issue
Block a user