This repository has been archived on 2021-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
gitea/compose.yml

111 lines
3.3 KiB
YAML
Raw Normal View History

2020-06-17 06:21:19 +00:00
version: "3.8"
services:
2020-10-27 10:25:48 +00:00
app:
image: "gitea/gitea:1.14.1-rootless"
2020-06-17 06:21:19 +00:00
configs:
- source: app_ini
target: /etc/gitea/app.ini
- source: docker_setup_sh
target: /usr/local/bin/docker-setup.sh
mode: 0555
2020-06-17 06:21:19 +00:00
secrets:
- db_password
2020-06-17 06:21:19 +00:00
- internal_token
- jwt_secret
- secret_key
environment:
2020-10-27 10:25:48 +00:00
- GITEA_ALLOW_ONLY_EXTERNAL_REGISTRATION
- GITEA_APP_NAME
- GITEA_AUTO_WATCH_NEW_REPOS
2020-10-27 10:36:05 +00:00
- GITEA_DB_HOST="db:3306"
2020-10-27 10:25:48 +00:00
- GITEA_DB_NAME=gitea
- GITEA_DB_TYPE=mysql
- GITEA_DB_USER=gitea
- GITEA_DISABLE_REGISTRATION
2020-06-17 06:21:19 +00:00
- GITEA_DOMAIN=${DOMAIN}
2020-10-27 10:25:48 +00:00
- GITEA_ENABLE_NOTIFY_MAIL
- GITEA_ENABLE_OPENID_SIGNIN
- GITEA_ENABLE_OPENID_SIGNUP
2021-04-29 15:15:50 +00:00
- GITEA_SMTP_MAILER_ENABLED
2020-10-27 10:25:48 +00:00
- GITEA_SSH_PORT
2020-06-17 06:21:19 +00:00
volumes:
- data:/var/lib/gitea
- config:/etc/gitea
2021-04-13 14:58:15 +00:00
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
2020-06-17 06:21:19 +00:00
networks:
- proxy
- internal
# Disabled for now, see https://github.com/go-gitea/gitea/issues/15661
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:3000"]
# interval: 15s
# timeout: 10s
# retries: 10
# start_period: 30s
2020-06-17 06:21:19 +00:00
deploy:
update_config:
failure_action: rollback
2020-06-22 17:41:06 +00:00
order: start-first
2020-06-17 06:21:19 +00:00
labels:
- "traefik.enable=true"
2021-03-02 10:15:19 +00:00
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=3000"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.tcp.routers.${STACK_NAME}-ssh.rule=HostSNI(`*`)"
- "traefik.tcp.routers.${STACK_NAME}-ssh.entrypoints=gitea-ssh"
- "traefik.tcp.services.${STACK_NAME}-ssh.loadbalancer.server.port=${GITEA_SSH_PORT}"
2021-04-16 07:07:43 +00:00
- coop-cloud.${STACK_NAME}.app.version=1.14.1-rootless-6244e9fc
2020-10-27 10:32:00 +00:00
db:
2020-06-23 09:10:33 +00:00
image: "mariadb:10.5"
command: |
mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
2020-06-23 09:10:33 +00:00
environment:
- MYSQL_DATABASE=gitea
- MYSQL_USER=gitea
- MYSQL_PASSWORD_FILE=/run/secrets/db_password
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
2020-06-17 06:21:19 +00:00
secrets:
- db_password
- db_root_password
2020-06-23 09:10:33 +00:00
volumes:
- "mariadb:/var/lib/mysql"
2020-06-17 06:21:19 +00:00
networks:
- internal
deploy:
2021-04-07 11:42:08 +00:00
labels: ["coop-cloud.${STACK_NAME}.db.version=10.5-9c681cef"]
2020-06-17 06:21:19 +00:00
networks:
internal:
proxy:
external: true
configs:
app_ini:
2020-10-27 10:25:48 +00:00
name: ${STACK_NAME}_app_ini_${APP_INI_VERSION}
2020-06-17 06:21:19 +00:00
file: app.ini.tmpl
template_driver: golang
docker_setup_sh:
name: ${STACK_NAME}_docker_setup_sh_${DOCKER_SETUP_SH_VERSION}
file: docker-setup.sh.tmpl
template_driver: golang
2020-06-17 06:21:19 +00:00
secrets:
db_password:
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
2020-06-17 06:21:19 +00:00
external: true
db_root_password:
name: ${STACK_NAME}_db_root_password_${SECRET_DB_ROOT_PASSWORD_VERSION}
2020-06-23 09:39:51 +00:00
external: true
2020-06-17 06:21:19 +00:00
internal_token:
name: ${STACK_NAME}_internal_token_${SECRET_INTERNAL_TOKEN_VERSION}
2020-06-17 06:21:19 +00:00
external: true
jwt_secret:
name: ${STACK_NAME}_jwt_secret_${SECRET_JWT_SECRET_VERSION}
2020-06-17 06:21:19 +00:00
external: true
secret_key:
name: ${STACK_NAME}_secret_key_${SECRET_SECRET_KEY_VERSION}
2020-10-27 10:25:48 +00:00
external: true
2020-06-17 06:21:19 +00:00
volumes:
data:
config:
2020-06-23 09:10:33 +00:00
mariadb: