selfhost/gitea/docker-compose.yaml

58 lines
1.3 KiB
YAML
Raw Normal View History

2020-11-28 21:51:37 +00:00
version: "3"
services:
web:
image: gitea/gitea:1
2020-11-28 21:51:37 +00:00
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"
2020-11-28 21:51:37 +00:00
- "traefik.http.routers.gitea.tls.options=intermediate@file"
- "traefik.http.services.gitea.loadbalancer.server.port=3000"
- "docker.group=gitea"
2020-11-28 21:51:37 +00:00
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
2020-11-28 21:51:37 +00:00
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"
2020-11-28 21:51:37 +00:00
networks:
gitea:
web:
external: true