From 5f55806497efe3f2a4d8ab80518cb9a81fecebdd Mon Sep 17 00:00:00 2001 From: Lucid Kobold Date: Wed, 15 Oct 2025 13:32:08 -0400 Subject: [PATCH 1/2] Update compose files to use env variables and the image. --- compose.override.yml | 17 ++++++++++++++--- compose.prod.yml | 20 +++++++++++++++++--- compose.yml | 16 ++++++++++++++-- 3 files changed, 45 insertions(+), 8 deletions(-) diff --git a/compose.override.yml b/compose.override.yml index 62b2876..3ba7ee2 100644 --- a/compose.override.yml +++ b/compose.override.yml @@ -1,9 +1,20 @@ services: - bot: + no-twitter-bot: + image: gitea.lucids-cove.duckdns.org/wkc/no-twitter-bot:latest + container_name: no-twitter-bot + environment: + - BOT_TOKEN=${BOT_TOKEN} + - BOT_MODE=${BOT_MODE} + - LOG_LEVEL=${LOG_LEVEL} + - DEBUG=${DEBUG} + - BOT_WEBHOOK=${BOT_WEBHOOK} + - BOT_WEBHOOK_SECRET=${BOT_WEBHOOK_SECRET} + - SERVER_HOST=${SERVER_HOST} + - SERVER_PORT=${SERVER_PORT} + - BOT_ADMINS=${BOT_ADMINS} + - GROUP_IDS=${GROUP_IDS} ports: - "3000:80" volumes: - ".:/usr/src" - env_file: - - .env.bot.dev command: npm run dev diff --git a/compose.prod.yml b/compose.prod.yml index 7ce893f..ced0f9d 100644 --- a/compose.prod.yml +++ b/compose.prod.yml @@ -1,4 +1,18 @@ services: - bot: - env_file: - - .env.bot.prod + no-twitter-bot: + image: gitea.lucids-cove.duckdns.org/wkc/no-twitter-bot:latest + container_name: no-twitter-bot + # env_file: stack.env + environment: + - BOT_TOKEN=${BOT_TOKEN} + - BOT_MODE=${BOT_MODE} + - LOG_LEVEL=${LOG_LEVEL} + - DEBUG=${DEBUG} + - BOT_WEBHOOK=${BOT_WEBHOOK} + - BOT_WEBHOOK_SECRET=${BOT_WEBHOOK_SECRET} + - SERVER_HOST=${SERVER_HOST} + - SERVER_PORT=${SERVER_PORT} + - BOT_ADMINS=${BOT_ADMINS} + - GROUP_IDS=${GROUP_IDS} + build: + context: . diff --git a/compose.yml b/compose.yml index 727d437..ced0f9d 100644 --- a/compose.yml +++ b/compose.yml @@ -1,6 +1,18 @@ services: - bot: + no-twitter-bot: + image: gitea.lucids-cove.duckdns.org/wkc/no-twitter-bot:latest container_name: no-twitter-bot - env_file: stack.env + # env_file: stack.env + environment: + - BOT_TOKEN=${BOT_TOKEN} + - BOT_MODE=${BOT_MODE} + - LOG_LEVEL=${LOG_LEVEL} + - DEBUG=${DEBUG} + - BOT_WEBHOOK=${BOT_WEBHOOK} + - BOT_WEBHOOK_SECRET=${BOT_WEBHOOK_SECRET} + - SERVER_HOST=${SERVER_HOST} + - SERVER_PORT=${SERVER_PORT} + - BOT_ADMINS=${BOT_ADMINS} + - GROUP_IDS=${GROUP_IDS} build: context: . From 98376d93d612de547e17abe3b9db83cc40f12f06 Mon Sep 17 00:00:00 2001 From: Lucid Kobold Date: Wed, 15 Oct 2025 13:32:18 -0400 Subject: [PATCH 2/2] update workflow order --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8bde682..350a332 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ on: env: REGISTRY: gitea.lucids-cove.duckdns.org - OWNER: lcm + OWNER: wkc IMAGE_NAME: no-twitter-bot jobs: @@ -18,7 +18,6 @@ jobs: matrix: node-version: [20.x] steps: - - uses: actions/checkout@v4 - name: "Base requirements" run: | # packages @@ -26,6 +25,7 @@ jobs: # ansible collections ansible-galaxy collection install community.general --force ansible-galaxy collection install ansible.posix --force + - uses: actions/checkout@v4 - name: Enable Corepack run: npm install -g corepack && corepack enable - name: Log into registry ${{ env.REGISTRY }}