gitea
Posted
Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD.
# file: `docker-compose.yml`
services:
gitea:
container_name: gitea
image: ${HONEYPI_IMAGE_REGISTRY_HOST:-docker.io}/gitea/gitea:${HONEYPI_GITEA_VERSION:-latest}
restart: unless-stopped
ports:
- ${HONEYPI_GITEA_PORT:-3000}:3000
- ${HONEYPI_GITEA_PORT_SSH:-2222}:2222
volumes:
- ${HONEYPI_DATA}/gitea/data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- GITEA__database__DB_TYPE=${HONEYPI_GITEA_DB_TYPE:-postgres}
- GITEA__database__HOST=${HONEYPI_POSTGRES_HOST:-localhost}
- GITEA__database__NAME=${HONEYPI_GITEA_DB_NAME:-gitea}
- GITEA__database__USER=${HONEYPI_POSTGRES_USER:-admin}
- GITEA__database__PASSWD=${HONEYPI_POSTGRES_PASSWORD}
- GITEA__mailer__ENABLED=true
- GITEA__mailer__FROM=${HONEYPI_EMAIL_FROM}
- GITEA__mailer__PROTOCOL=smtp+starttls
- GITEA__mailer__SMTP_ADDR=${HONEYPI_EMAIL_HOST}
- GITEA__mailer__SMTP_PORT=${HONEYPI_EMAIL_PORT}
- GITEA__mailer__USER=${HONEYPI_EMAIL_USERNAME}
- GITEA__mailer__PASSWD=${HONEYPI_EMAIL_PASSWORD}
- GITEA__openid__ENABLE_OPENID_SIGNIN=true
- GITEA__service__DISABLE_REGISTRATION=true
- GITEA__server__START_SSH_SERVER=true
- GITEA__server__SSH_PORT=22
- GITEA__repository__USE_COMPAT_SSH_URI=true
- GITEA__server__SSH_LISTEN_PORT=${HONEYPI_GITEA_PORT_SSH:-2222}
- GITEA__actions__ENABLED=true
labels:
- traefik.enable=${HONEYPI_GITEA_TRAEFIK_ENABLE:-false}
- traefik.http.routers.gitea.rule=Host(`${HONEYPI_GITEA_HOST}`)
- traefik.http.routers.gitea.entrypoints=websecure
- traefik.http.routers.gitea.tls.certresolver=resolver
- traefik.http.routers.gitea.service=gitea
- traefik.http.services.gitea.loadbalancer.server.port=3000