Files
homelab/gitea/compose.yml
T
2024-02-29 01:21:44 +03:00

48 lines
1.3 KiB
YAML

version: "3.9"
networks:
proxy:
external: true
services:
gitea-server:
image: gitea/gitea:latest
container_name: gitea
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=gitea-db:5432
- GITEA__database__NAME=gitea
- GITEA__database__USER=gitea
- GITEA__database__PASSWD=gitea # change this to something strong
restart: always
networks:
- proxy
volumes:
- ./gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
labels:
- traefik.enable=true
- traefik.http.routers.gitea.entrypoints=https
- traefik.http.routers.gitea.rule=Host(`git.example.com`)
- traefik.http.routers.gitea.tls=true
- traefik.http.routers.gitea.service=gitea
- traefik.http.services.gitea.loadbalancer.server.port=3000
ports:
- 3033:3000
- 222:22
depends_on:
- gitea-db
gitea-db:
image: postgres:14
container_name: gitea-db
restart: always
environment:
- POSTGRES_USER=gitea
- POSTGRES_PASSWORD=gitea # change this to the same value you put above
- POSTGRES_DB=gitea
networks:
- proxy
volumes:
- ./postgres:/var/lib/postgresql/data