services/gitea/docker-compose.yml

30 lines
861 B
YAML

version: "3.8"
volumes:
gitea:
name: ${GITEA_VOLUME_NAME:-gitea}
services:
gitea:
container_name: ${GITEA_CONTAINER_NAME:-gitea}
image: ${GITEA_IMAGE:-gitea/gitea:1.18.4}
restart: always
environment:
- USER_UID=${GITEA_UID:-1000}
- USER_GID=${GITEA_GID:-1000}
# Database
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=${POSTGRES_CONTAINER_NAME:-postgres}:5432
- GITEA__database__NAME=${POSTGRES_DB}
- GITEA__database__USER=${POSTGRES_USER}
- GITEA__database__PASSWD=${POSTGRES_PASSWORD}
# Security
- GITEA__security__SECRET_KEY=${GITEA_SECRET_KEY:-}
- GITEA__security__INTERNAL_TOKEN=${GITEA_INTERNAL_TOKEN:-}
volumes:
- gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
depends_on:
- postgres