#!/bin/bash # Switch to Traefik mode echo "Stopping test container..." docker compose -f /home/zly/project/bttoxin-pipeline/docker/compose/docker-compose.test.yml down echo "Starting with Traefik..." docker run -d \ --name bttoxin-pipeline \ --network frontend \ -v /home/zly/project/bttoxin-pipeline/jobs:/app/jobs \ -e JOBS_DIR=/app/jobs \ --label traefik.enable=true \ --label traefik.http.routers.bttoxin.rule="Host(\`bttiaw.hzau.edu.cn\`)" \ --label traefik.http.routers.bttoxin.entrypoints=web \ --label traefik.http.routers.bttoxin.middlewares=redirect-to-https \ --label traefik.http.routers.bttoxin-secure.rule="Host(\`bttiaw.hzau.edu.cn\`)" \ --label traefik.http.routers.bttoxin-secure.entrypoints=websecure \ --label traefik.http.routers.bttoxin-secure.tls=true \ --label traefik.http.services.bttoxin.loadbalancer.server.port=8000 \ --label traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https \ --label traefik.http.middlewares.redirect-to-https.redirectscheme.permanent=true \ --restart unless-stopped \ bttoxin-pipeline:latest echo "Done! Access via: https://bttiaw.hzau.edu.cn"