From 661f3f0ab01e97e77a07199ebe444d8411281e5c Mon Sep 17 00:00:00 2001 From: LightZirconite Date: Fri, 14 Nov 2025 07:35:02 +0100 Subject: [PATCH] fix: Update Docker configuration to improve volume mounts and remove unnecessary Playwright browser copy --- .dockerignore | 3 +-- docker/Dockerfile | 4 ---- docker/compose.yaml | 6 +++--- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.dockerignore b/.dockerignore index 7cc0ca8..dcf2b72 100644 --- a/.dockerignore +++ b/.dockerignore @@ -41,9 +41,8 @@ docs/ .gitlab-ci.yml # Session and runtime data (mounted as volumes) -sessions/ +# Note: sessions/ NOT excluded - needed for volume mount in Docker reports/ -browser/ # Development files *.log diff --git a/docker/Dockerfile b/docker/Dockerfile index 389a6e5..355549c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -79,10 +79,6 @@ COPY --from=builder /usr/src/microsoft-rewards-bot/dist ./dist COPY --from=builder /usr/src/microsoft-rewards-bot/package*.json ./ COPY --from=builder /usr/src/microsoft-rewards-bot/node_modules ./node_modules -# FIXED: Copy Playwright browsers from builder (they're in node_modules with PLAYWRIGHT_BROWSERS_PATH=0) -# This prevents "Chromium not installed" errors on subsequent runs -COPY --from=builder /usr/src/microsoft-rewards-bot/node_modules/@playwright ./node_modules/@playwright - # Copy runtime scripts with proper permissions and normalize line endings for non-Unix users # IMPROVED: Scripts now organized in docker/ folder COPY --chmod=755 docker/run_daily.sh ./docker/run_daily.sh diff --git a/docker/compose.yaml b/docker/compose.yaml index 19bf528..9862cb2 100644 --- a/docker/compose.yaml +++ b/docker/compose.yaml @@ -8,9 +8,9 @@ services: # Volume mounts: Specify a location where you want to save the files on your local machine. volumes: - - ./src/accounts.jsonc:/usr/src/microsoft-rewards-bot/dist/accounts.jsonc:ro - - ./src/config.jsonc:/usr/src/microsoft-rewards-bot/dist/config.jsonc:ro - - ./sessions:/usr/src/microsoft-rewards-bot/dist/browser/sessions # Optional, saves your login session + - ../src/accounts.jsonc:/usr/src/microsoft-rewards-bot/dist/accounts.jsonc:ro + - ../src/config.jsonc:/usr/src/microsoft-rewards-bot/dist/config.jsonc:ro + - ../sessions:/usr/src/microsoft-rewards-bot/sessions # Optional, saves your login session environment: TZ: "America/Toronto" # Set your timezone for proper scheduling