[root@demo ddns-go]# more > docker-compose.yml << \EOF
version: "3"
services:
ddns-go:
image: jeessy/ddns-go
container_name: ddns-go
restart: always
ports:
- 9876:9876
volumes:
- /SSD/Dockerfile/ddns-go:/root
networks:
- traefik_net
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik_net"
- "traefik.http.routers.ddns-go.rule=Host(ddns-go.rockylinux.cn)"
- "traefik.http.routers.ddns-go.entryPoints=websecure"
- "traefik.http.routers.ddns-go.tls.certresolver=myresolver"
- "traefik.http.routers.ddns-go.service=ddns-go"
- "traefik.http.services.ddns-go.loadbalancer.server.port=9876"
networks:
traefik_net:
external: true
EOF
[root@demo ddns-go]# docker-compose up -d
添加评论