playground/docker-stack/codepot.yml

46 lines
1.4 KiB
YAML
Raw Permalink Normal View History

2022-10-09 16:59:31 +00:00
version: '3.8'
networks:
traefik-network:
external: true
services:
codepot-service:
image: docker.io/hyunghwan/codepot:ubnt
hostname: codepot-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
command:
- --port=80
- --hide-index-page=yes
- --https-redirected=yes
volumes:
- type: bind
source: /home/gfs-data/codepot-1
target: /var/lib/codepot
deploy:
replicas: 1
placement:
max_replicas_per_node: 1
##constraints: [node.role == manager]
resources:
limits:
memory: 1GB
restart_policy:
condition: on-failure
labels:
- traefik.enable=true
- traefik.http.routers.codepot-secure.entrypoints=websec
- traefik.http.routers.codepot-secure.rule=Host(`gitea.miflux.com`)
- traefik.http.routers.codepot-secure.tls=true
- traefik.http.routers.codepot-plain.entrypoints=web
- traefik.http.routers.codepot-plain.rule=Host(`gitea.miflux.com`)
- traefik.http.services.codepot.loadbalancer.sticky.cookie=true
- traefik.http.services.codepot.loadbalancer.sticky.cookie.name=codepot-sticker
- traefik.http.services.codepot.loadbalancer.server.port=80
networks:
- traefik-network