1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| mkdir -p /data/gogs
docker service create \ --name git \ --mount type=bind,source=/data/gogs,target=/data \ --network traefik-net \ --container-label traefik.w1.backend="git" \ --container-label traefik.w1.frontend.entryPoints="https" \ --container-label traefik.w1.frontend.rule="Host: git.karoy.cn" \ --container-label traefik.w1.port='3000' \ --container-label traefik.w1.protocol='http' \ --container-label traefik.w3.backend="git-ssh" \ --container-label traefik.w3.frontend.entryPoints="https" \ --container-label traefik.w3.frontend.rule="Host: git-ssh.karoy.cn" \ --container-label traefik.w3.port='22' \ --container-label traefik.w3.protocol='tcp' \ --replicas 1 \ gogs/gogs:latest
|