playground/docker-stack/gitea.yml

90 lines
2.9 KiB
YAML
Raw Normal View History

2022-10-09 16:59:31 +00:00
version: "3.8"
networks:
host-network:
name: host
external: true
prometheus-network:
external: true
traefik-network:
external: true
services:
gitea-service:
2022-12-26 17:05:28 +00:00
image: gitea/gitea:1.17.4
2022-10-09 16:59:31 +00:00
hostname: gitea-service-host
tty: true
environment:
2022-10-30 15:40:09 +00:00
- DS_NODE_NAME={{.Node.Hostname}}
- DS_SERVICE_NAME={{.Service.Name}}
- DS_TASK_NAME={{.Task.Name}}
2022-10-09 16:59:31 +00:00
##- USER_UID=1000
##- USER_GID=1000
- GITEA____APP_NAME=HYUNG-HWAN
- GITEA__server__DISABLE_SSH=true
- GITEA__server__HTTP_PORT=3000
- GITEA__server__ROOT_URL=https://code.miflux.com/
- GITEA__indexer__REPO_INDEXER_ENABLED=true
- GITEA__indexer__REPO_INDEXER_PATH=/data/gitea/indexers/repos.bleve
- GITEA__indexer__UPDATE_BUFFER_LEN=20
- GITEA__indexer__MAX_FILE_SIZE=1048576
- GITEA__indexer__REPO_INDEXER_INCLUDE=
- GITEA__indexer__REPO_INDEXER_EXCLUDE=resources/bin/**
- GITEA__service__DISABLE_REGISTRATION=true
- GITEA__service__DEFAULT_ALLOW_CREATE_ORGANIZATION=true
- GITEA__service__EMAIL_NOTIFY_TRUE=false
- GITEA__openid__ENABLE_OPENID_SIGNIN=false
- GITEA__openid__ENABLE_OPENID_SIGNUP=false
2022-10-30 15:40:09 +00:00
- GITEA__webhook__ALLOWED_HOST_LIST=*
2022-10-09 16:59:31 +00:00
- GITEA__metrics__ENABLED=true
- GITEA__attachment__ENABLED=true
- GITEA__attachment__ALLOWED_TYPES=*/*
- GITEA__attachment__MAX_SIZE=100
2022-10-09 16:59:31 +00:00
networks:
- traefik-network
- prometheus-network
volumes:
- type: bind
source: /home/gfs-data/gitea
target: /data
- type: bind
source: /etc/timezone
target: /etc/timezone
read_only: true
- type: bind
source: /etc/localtime
target: /etc/localtime
read_only: true
# ports:
# - target: 3000
# published: 3000
# protocol: tcp
# - target: 22
# published: 222
# protocol: tcp
deploy:
mode: replicated
replicas: 1
placement:
max_replicas_per_node: 1
##constraints:
## - node.labels.location == home
## - node.hostname == rose
resources:
limits:
memory: 1GB
restart_policy:
condition: on-failure
labels:
- traefik.enable=true
##- traefik.docker.network=traefik-network
- traefik.http.routers.gitea-https.entrypoints=websec
- traefik.http.routers.gitea-https.rule=Host(`code.miflux.com`)
- traefik.http.routers.gitea-https.tls=true
# - traefik.http.routers.gitea-http.entrypoints=web
# - traefik.http.routers.gitea-http.rule=Host(`code.miflux.com`)
# - traefik.http.routers.gitea-http.tls=false
- traefik.http.services.gitea-service.loadbalancer.server.port=3000
- traefik.http.services.gitea-service.loadbalancer.sticky.cookie=true
- traefik.http.services.gitea-service.loadbalancer.sticky.cookie.name=gitea-sticker