57 lines
1.3 KiB
YAML
57 lines
1.3 KiB
YAML
|
version: "3"
|
||
|
|
||
|
services:
|
||
|
|
||
|
web:
|
||
|
image: gitea/gitea:1.13
|
||
|
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"
|
||
|
- "traefik.docker.network=web"
|
||
|
- "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:9.6
|
||
|
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
|
||
|
|