-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat(website): Add compose.bundle.yml for local bundled server testing #1067
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
34dcd38
feat(website): Add compose.bundle.yml for local bundled server testing
yamadashy 183d75f
fix(website): Set NODE_ENV=development in compose.bundle.yml
yamadashy 9a5bdf7
feat(website): Add client to compose.bundle.yml
yamadashy 60639ba
refactor(website-server): Extract bundle scripts to package.json
yamadashy 8293b68
refactor(website-server): Create JS bundle script
yamadashy ac0785f
fix(website-server): Update esbuild target to node24
yamadashy b0bfcf9
chore(website-server): Update package-lock.json for esbuild
yamadashy 97d3132
chore(website-server): Update esbuild to ^0.27.2
yamadashy 4b9d84d
chore(website-server): Add dist-bundled to gitignore
yamadashy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # Run website with bundled server (production-like build) | ||
| # $ docker compose -f website/compose.bundle.yml up --build | ||
| # | ||
| # This compose file builds and runs the server in bundled mode, | ||
| # similar to the production Cloud Run environment. | ||
| # Useful for testing esbuild bundling, compile cache, and startup performance locally. | ||
|
|
||
| services: | ||
| client: | ||
| build: | ||
| context: ./client | ||
| dockerfile: Dockerfile | ||
| ports: | ||
| - "5173:5173" | ||
| volumes: | ||
| - ./client:/app | ||
| environment: | ||
| - NODE_ENV=development | ||
| command: sh -c "npm i && npm run docs:dev -- --port 5173 --host" | ||
|
|
||
| server: | ||
| build: | ||
| context: ./server | ||
| dockerfile: Dockerfile | ||
| ports: | ||
| - "8080:8080" | ||
| environment: | ||
| # Use development mode to avoid Google Cloud Logging authentication errors | ||
| - NODE_ENV=development | ||
| # No volume mounts - use the bundled files from Docker image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| dist | ||
| dist-bundled | ||
| node_modules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a better local testing experience, consider using
docker compose runinstead ofup. Theruncommand with the--rmflag will automatically clean up the container when you stop it (e.g., with Ctrl+C), preventing dangling containers. The--service-portsflag is needed to publish the container's ports to the host.This approach is particularly well-suited for the testing scenario described in the PR, as it ensures a clean state for each run without requiring a manual
docker compose down.If you apply this change, you might also want to update the example command in the
website/compose.bundle.ymlfile's header comment for consistency.