# documentation: https://docs.gitea.com # slogan: Gitea is a self-hosted, lightweight Git service, offering version control, collaboration, and code hosting. # tags: version control, collaboration, code, hosting, lightweight, mysql # logo: svgs/gitea.svg services: gitea: image: gitea/gitea:latest environment: - SERVICE_FQDN_GITEA_3000 - USER_UID=1000 - USER_GID=1000 - GITEA__database__DB_TYPE=mysql - GITEA__database__HOST=mysql - GITEA__database__NAME=${MYSQL_DATABASE-gitea} - GITEA__database__USER=$SERVICE_USER_MYSQL - GITEA__database__PASSWD=$SERVICE_PASSWORD_MYSQL volumes: - gitea-data:/data - gitea-timezone:/etc/timezone:ro - gitea-localtime:/etc/localtime:ro ports: - 22222:22 depends_on: mysql: condition: service_healthy healthcheck: test: ["CMD", "curl", "-f", "http://127.0.0.1:3000"] interval: 2s timeout: 10s retries: 15 mysql: image: mysql:8.0 volumes: - gitea-mysql-data:/var/lib/mysql environment: - MYSQL_USER=${SERVICE_USER_MYSQL} - MYSQL_PASSWORD=${SERVICE_PASSWORD_MYSQL} - MYSQL_DATABASE=${MYSQL_DATABASE} - MYSQL_ROOT_PASSWORD=${SERVICE_PASSWORD_MYSQLROOT} healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1"] interval: 5s timeout: 20s retries: 10