selfhost/gitea/docker-compose.yaml
Florian Zirker 38f5ac4406 Monitoring with telegraf, influxdb grafana:
- Influxdb (1.8) behind traefik proxy so that telegraf can run in host_mode. Secured with HTTP basic auth
- Grafana (7.4) with Postgres database for beatifull dashboards
- Telegraf (1.18) in docker host mode with local configuration file
- Added docker.group to all other docker services to track them in monitoring
2021-03-28 14:04:05 +02:00

58 lines
1.3 KiB
YAML

version: "3"
services:
web:
image: gitea/gitea:1
volumes:
- ${VOLUMES_PATH}/gitea_data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "2222:22"
networks:
- web
- gitea
labels:
- "traefik.enable=true"
- "traefik.http.routers.gitea.rule=Host(`gitea.${DOMAIN}`)"
- "traefik.http.routers.gitea.entrypoints=websecure"
- "traefik.http.routers.gitea.tls.certresolver=netcup"
- "traefik.http.routers.gitea.tls.options=intermediate@file"
- "traefik.http.services.gitea.loadbalancer.server.port=3000"
- "docker.group=gitea"
depends_on:
- db
restart: unless-stopped
environment:
- USER_UID=1000
- USER_GID=1000
- DB_TYPE=mysql
- DB_TYPE=postgres
- DB_HOST=db:5432
- DB_NAME=${POSTGRES_DB}
- DB_USER=${POSTGRES_USER}
- DB_PASSWD=${POSTGRES_PASSWORD}
db:
image: postgres:13
restart: unless-stopped
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
networks:
- gitea
volumes:
- ${VOLUMES_PATH}/gitea_db:/var/lib/postgresql/data
labels:
- "docker.group=gitea"
networks:
gitea:
web:
external: true