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>
This commit is contained in:
@@ -175,10 +175,10 @@ services:
|
||||
- "traefik.http.routers.bttoxin-backend.entrypoints=websecure"
|
||||
# ... 其他 label
|
||||
networks:
|
||||
- your-main-network
|
||||
- frontend
|
||||
|
||||
networks:
|
||||
your-main-network:
|
||||
frontend:
|
||||
external: true
|
||||
```
|
||||
|
||||
|
||||
@@ -14,14 +14,14 @@ services:
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- traefik-network
|
||||
- frontend
|
||||
|
||||
redis:
|
||||
image: docker.m.daocloud.io/library/redis:7-alpine
|
||||
container_name: bttoxin-redis
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- traefik-network
|
||||
- frontend
|
||||
|
||||
bttoxin:
|
||||
build:
|
||||
@@ -42,10 +42,11 @@ services:
|
||||
- postgres
|
||||
- redis
|
||||
networks:
|
||||
- traefik-network
|
||||
- frontend
|
||||
labels:
|
||||
# Enable Traefik for this container
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=frontend"
|
||||
|
||||
# HTTP Router (redirect to HTTPS)
|
||||
- "traefik.http.routers.bttoxin.rule=Host(`bttiaw.hzau.edu.cn`)"
|
||||
@@ -65,10 +66,8 @@ services:
|
||||
- "traefik.http.middlewares.redirect-to-https.redirectscheme.permanent=true"
|
||||
|
||||
networks:
|
||||
traefik-network:
|
||||
frontend:
|
||||
external: true
|
||||
# Create this network first: docker network create traefik-network
|
||||
# Or set external: false to let docker-compose create it
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
@@ -91,7 +90,7 @@ volumes:
|
||||
# volumes:
|
||||
# - "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||
# networks:
|
||||
# - traefik-network
|
||||
# - frontend
|
||||
#
|
||||
# networks:
|
||||
# traefik-network:
|
||||
# frontend:
|
||||
|
||||
@@ -7,7 +7,7 @@ docker compose -f /home/zly/project/bttoxin-pipeline/docker/compose/docker-compo
|
||||
echo "Starting with Traefik..."
|
||||
docker run -d \
|
||||
--name bttoxin-pipeline \
|
||||
--network traefik-network \
|
||||
--network frontend \
|
||||
-v /home/zly/project/bttoxin-pipeline/jobs:/app/jobs \
|
||||
-e JOBS_DIR=/app/jobs \
|
||||
--label traefik.enable=true \
|
||||
|
||||
Reference in New Issue
Block a user