gitea/compose.yml

100 lines
2.9 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:
2021-04-13 14:51:59 +00:00
image: "gitea/gitea:1.14.0-rootless"
2020-06-17 06:21:19 +00:00
configs:
- source: app_ini
target: /data/gitea/conf/app.ini
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
- GITEA_SSH_PORT
2020-06-17 06:21:19 +00:00
volumes:
- "git:/data"
2020-10-27 10:25:48 +00:00
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
2020-06-17 06:21:19 +00:00
networks:
- proxy
- internal
2020-06-22 17:41:06 +00:00
healthcheck:
2020-07-01 08:00:29 +00:00
test: ["CMD", "curl", "-f", "http://localhost:3000"]
2020-06-22 17:41:06 +00:00
interval: 15s
timeout: 10s
retries: 10
2020-10-27 10:25:48 +00:00
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-13 08:33:06 +00:00
- coop-cloud.${STACK_NAME}.app.version=1.14.0-327bfb3f
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
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:
git:
2020-06-23 09:10:33 +00:00
mariadb: