playground/docker-stack/gitea.yml

95 lines
3.0 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:
2023-07-25 14:27:43 +00:00
image: gitea/gitea:1.20.1
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
2023-07-17 13:16:21 +00:00
##- GITEA__indexer__UPDATE_BUFFER_LEN=20
2022-10-09 16:59:31 +00:00
- 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
2022-12-30 07:59:36 +00:00
logging:
driver: "local"
options:
max-file: "5"
max-size: "5m"
2022-10-09 16:59:31 +00:00
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