From c925dea4fbd71adcc10f4c579b33dc0f841ee753 Mon Sep 17 00:00:00 2001 From: Vassiliy Kuzenkov Date: Sun, 17 Sep 2023 00:22:11 +0600 Subject: [PATCH] Add ligretto-bot deploy (#425) * add ligretto-bot deploy * update port --- .deploy/ligretto.deploy.yml | 28 +++++++++++++++++++++++++-- .github/workflows/ligretto-deploy.yml | 7 ++++++- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/.deploy/ligretto.deploy.yml b/.deploy/ligretto.deploy.yml index 15e32746..4dcd22e1 100644 --- a/.deploy/ligretto.deploy.yml +++ b/.deploy/ligretto.deploy.yml @@ -9,14 +9,13 @@ services: - LIGRETTO_GAMEPLAY_CAS_KEY_PATH=/ligretto-gameplay-backend/key.pem - LIGRETTO_CORE_URL=http://ligretto-core-backend:3333/api - LIGRETTO_GAMEPLAY_SOCKET_PORT=3005 - labels: - prometheus-job: ligretto-gameplay-backend networks: - ligretto_net - traefik-public - metrics-targets deploy: labels: + - "prometheus-job=ligretto-gameplay-backend" - "traefik.enable=true" - "traefik.http.routers.ligretto-gameplay-backend.rule=Host(`api.ligretto.app`)" - "traefik.http.routers.ligretto-gameplay-backend.entrypoints=web" @@ -78,6 +77,31 @@ services: - ligretto_net volumes: - ligretto-core-pg:/var/lib/postgresql/data + ligretto-bot-clj: + image: ghcr.io/memebattle/ligretto-bot-clj:latest + networks: + - ligretto_net + - traefik-public + - metrics-targets + environment: + - APP_PORT=4201 + - APP_HOST=0.0.0.0 + deploy: + labels: + - "prometheus-job=ligretto-bot-clj" + - "traefik.enable=true" + - "traefik.http.routers.ligretto-bot-clj.rule=Host(`bots.ligretto.app`)" + - "traefik.http.routers.ligretto-bot-clj.entrypoints=web" + - "traefik.http.services.ligretto-bot-clj.loadbalancer.server.port=4201" + - "traefik.http.services.ligretto-bot-clj.loadbalancer.passhostheader=true" + replicas: 1 + update_config: + parallelism: 2 + delay: 10s + restart_policy: + condition: on-failure + delay: 10s + max_attempts: 3 secrets: LIGRETTO_CAS_KEY: diff --git a/.github/workflows/ligretto-deploy.yml b/.github/workflows/ligretto-deploy.yml index f1457e9b..98db463c 100644 --- a/.github/workflows/ligretto-deploy.yml +++ b/.github/workflows/ligretto-deploy.yml @@ -1,8 +1,13 @@ name: 'Ligretto build, push and deploy' on: + workflow_dispatch: + branches: + - master push: - branches: [ master ] + branches: + - master + - update-deploy paths-ignore: - 'apps/gamehub-client/**' - 'apps/blog/**'