forked from ethibox/awesome-stacks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgogs.yml
26 lines (23 loc) · 791 Bytes
/
gogs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# DOMAIN=example.com docker stack deploy -c gogs.yml gogs
services:
gogs:
image: gogs/gogs:${VERSION:-0.12.3}
user: root
ports:
- {target: 22, published: 10022, mode: host, protocol: tcp}
volumes:
- ${VOLUME_PATH}data:/data
deploy:
labels:
- traefik.enable=true
- traefik.http.routers.gogs-${NUMBER:-1}.rule=Host(`${DOMAIN:-gogs.localhost}`)
- traefik.http.routers.gogs-${NUMBER:-1}.entrypoints=${SCHEME:-https}
- traefik.http.routers.gogs-${NUMBER:-1}.service=gogs-${NUMBER:-1}
- traefik.http.routers.gogs-${NUMBER:-1}.tls.certresolver=letsencrypt
- traefik.http.services.gogs-${NUMBER:-1}.loadbalancer.server.port=3000
volumes:
data:
networks:
default:
external: true
name: traefik-net