Files
bttoxin-pipeline/docker/scripts/switch-to-traefik.sh
zly 65ba1d938d refactor(docker): standardize docker network name to 'frontend'
- Replace 'traefik-network' with 'frontend' in docker-compose.traefik.yml
- Replace 'traefik-network' with 'frontend' in switch-to-traefik.sh
- Replace 'your-main-network' with 'frontend' in DOCKER_DEPLOYMENT.md examples
- Ensure consistency across Docker configuration and documentation

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-14 14:39:57 +08:00

27 lines
1.1 KiB
Bash
Executable File

#!/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"