Skip to content

Commit

Permalink
update traefik
Browse files Browse the repository at this point in the history
  • Loading branch information
Wcc723 committed Oct 6, 2023
1 parent a91396a commit cfbf606
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ services:
depends_on:
- mongo
restart: on-failure
networks: # 此網路設定需要與 traefik 一致
- casper
labels:
- traefik.enable=true
- "traefik.http.routers.webservice.entrypoints=web" # 使用 web 入口點,對應到 80 端口
- "traefik.http.routers.webservice.rule=Host(`node-service.casper2023.cc`)" # 對應到 custom2.xxx 主機名
- "traefik.http.routers.webservice.service=webservice" # 設置服務名稱
- traefik.http.services.webservice.loadbalancer.server.port=3000

mongo: # 服務名稱
image: mongo:latest # dokcer hub
Expand All @@ -26,3 +34,7 @@ services:

volumes:
mongo-data:

networks:
casper:
name: casper-network

0 comments on commit cfbf606

Please sign in to comment.