Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Wcc723 committed Oct 6, 2023
1 parent 11fe42b commit 19ad0fd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy to Portainer
on:
push:
branches:
- feature/action-docker-compose
- feature/action-docker-traefik

jobs:
build-and-push:
Expand Down
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(`ironman-node.casper.tw`)" # 對應到 custom2.xxx 主機名
- "traefik.http.routers.webservice.service=web" # 設置服務為 Traefik 的內部 API
- traefik.http.services.webservice.loadbalancer.server.port=3000

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

volumes:
mongo-data:

networks: # 最後,也再加入網路設定,所有需要使用相同 traefik 群組的,都要加入
casper:
name: casper-network

0 comments on commit 19ad0fd

Please sign in to comment.