2020-11-28 22:51:37 +01:00
|
|
|
version: "3"
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
web:
|
2021-01-14 21:53:12 +01:00
|
|
|
image: gitea/gitea:1
|
2020-11-28 22:51:37 +01: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=myresolver"
|
|
|
|
- "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:
|
2021-01-09 20:30:27 +01:00
|
|
|
image: postgres:13
|
2020-11-28 22:51:37 +01: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
|
|
|
|
|
|
|
|
|
|
|
|
networks:
|
|
|
|
gitea:
|
|
|
|
web:
|
|
|
|
external: true
|
|
|
|
|