[PR #6330] [CLOSED] [WIP] Feat: Add dedicated Docker setup for web development #32372

Closed
opened 2026-04-18 08:25:37 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/6330
Author: @gianiaz
Created: 12/8/2025
Status: Closed

Base: masterHead: docker-on-mac-development-environment


📝 Commits (2)

  • 8adedaf New feature: Dedicated setup for web deb, fixes agnostic urls in vite.config.mts and app.ts
  • b256fc0 [autofix.ci] apply automated fixes

📊 Changes

5 files changed (+79 additions, -1 deletions)

View changed files

Dockerfile.web-dev (+12 -0)
docker-compose.web-dev.yaml (+58 -0)
📝 packages/desktop-client/vite.config.mts (+3 -0)
📝 packages/sync-server/src/app.ts (+1 -1)
upcoming-release-notes/6330.md (+5 -0)

📄 Description

I was unable to get the current docker-compose setup working on my local environment. Despite trying various configurations, I consistently encountered 504 Gateway Timeouts (server proxying to localhost instead of the container) and issues with the backend worker (kcab.worker) not being built.

Instead of modifying the existing files (and risking breaking the workflow for others), I created a dedicated configuration specifically for web development.

With this new setup, I can successfully load Actual on port 5006, with the server correctly proxying requests to the frontend and fully working hot-reloading.

Changes
New Files:

docker-compose.web-dev.yml: A dedicated compose file that sets up the correct networking and startup commands (yarn start:browser) for web development.

Dockerfile.web-dev: A specific Dockerfile optimized for this dev workflow.

Code Updates (for Docker compatibility):

packages/sync-server/src/app.ts: Updated to use process.env.CLIENT_URL for the proxy target. This allows the server to point to the web container instead of hardcoded localhost.

vite.config.mts: Added ALLOWED_HOSTS support to prevent "Invalid Host Header" errors when accessing Vite through the Docker network.

Note to Reviewers
I opted to introduce new file names (*.web-dev) to avoid conflicts with the existing setup. Regarding the changes to app.ts and vite.config.mts: these were necessary to make the app configurable via environment variables (essential for Docker networking). If there is a preferred way to handle these config overrides without touching the source files, please let me know, and I will adjust the PR accordingly.

How to test
Run the new compose file:

Bash

docker compose -f docker-compose.web-dev.yml up --build
Navigate to http://localhost:5006.

The app should load correctly with the backend worker running.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/6330 **Author:** [@gianiaz](https://github.com/gianiaz) **Created:** 12/8/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `docker-on-mac-development-environment` --- ### 📝 Commits (2) - [`8adedaf`](https://github.com/actualbudget/actual/commit/8adedafdf0e2a6963eee2627dde5dd62ff9a3be5) :sparkles: New feature: Dedicated setup for web deb, fixes agnostic urls in vite.config.mts and app.ts - [`b256fc0`](https://github.com/actualbudget/actual/commit/b256fc0740afbfb57b3b91a713a9f7d6153c45db) [autofix.ci] apply automated fixes ### 📊 Changes **5 files changed** (+79 additions, -1 deletions) <details> <summary>View changed files</summary> ➕ `Dockerfile.web-dev` (+12 -0) ➕ `docker-compose.web-dev.yaml` (+58 -0) 📝 `packages/desktop-client/vite.config.mts` (+3 -0) 📝 `packages/sync-server/src/app.ts` (+1 -1) ➕ `upcoming-release-notes/6330.md` (+5 -0) </details> ### 📄 Description I was unable to get the current docker-compose setup working on my local environment. Despite trying various configurations, I consistently encountered 504 Gateway Timeouts (server proxying to localhost instead of the container) and issues with the backend worker (kcab.worker) not being built. Instead of modifying the existing files (and risking breaking the workflow for others), I created a dedicated configuration specifically for web development. With this new setup, I can successfully load Actual on port 5006, with the server correctly proxying requests to the frontend and fully working hot-reloading. Changes New Files: docker-compose.web-dev.yml: A dedicated compose file that sets up the correct networking and startup commands (yarn start:browser) for web development. Dockerfile.web-dev: A specific Dockerfile optimized for this dev workflow. Code Updates (for Docker compatibility): packages/sync-server/src/app.ts: Updated to use process.env.CLIENT_URL for the proxy target. This allows the server to point to the web container instead of hardcoded localhost. vite.config.mts: Added ALLOWED_HOSTS support to prevent "Invalid Host Header" errors when accessing Vite through the Docker network. Note to Reviewers I opted to introduce new file names (*.web-dev) to avoid conflicts with the existing setup. Regarding the changes to app.ts and vite.config.mts: these were necessary to make the app configurable via environment variables (essential for Docker networking). If there is a preferred way to handle these config overrides without touching the source files, please let me know, and I will adjust the PR accordingly. How to test Run the new compose file: Bash docker compose -f docker-compose.web-dev.yml up --build Navigate to http://localhost:5006. The app should load correctly with the backend worker running. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-18 08:25:38 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#32372