Skip to content

added cadvisor port for both stands #66

added cadvisor port for both stands

added cadvisor port for both stands #66

Workflow file for this run

name: Build and deploy Anybot
on:
push:
branches:
- main
- test-any-bot
workflow_dispatch:
env:
NODE_VERSION: 18
jobs:
deploy:
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- runner: [self-hosted, prod]
branch: refs/heads/main
stand: prod
anybotPort: 3000
timerTriggerPort: 3001
blobPort: 10000
cavdisorPort: 8080
- runner: [self-hosted, test]
branch: refs/heads/test-any-bot
stand: test
anybotPort: 3002
timerTriggerPort: 3003
blobPort: 11000
cavdisorPort: 8081
steps:
- name: Checkout GitHub Action
if: ${{ github.ref == matrix.branch }}
uses: actions/checkout@v2
- name: Set stand variable
if: ${{ github.ref == matrix.branch }}
run: |
echo "STAND=${{ matrix.stand }}" > .env
echo "ANYBOT_PORT=${{ matrix.anybotPort }}" >> .env
echo "TIMER_TRIGGER_PORT=${{ matrix.timerTriggerPort }}" >> .env
echo "BLOB_PORT=${{ matrix.blobPort }}" >> .env
echo "CADVISOR_PORT=${{ matrix.cavdisorPort }}" >> .env
- name: Restart docker compose
if: ${{ github.ref == matrix.branch }}
run: |
docker-compose --project-name ${{ matrix.stand }} down
docker-compose --project-name ${{ matrix.stand }} up --build -d