-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Vite now listens on port
9229
in container
There seemed to be some issue when Vite was launched as a background process (with `&` in the shell). When this was done, Vite would not listen on port 9229; it would detect that port being taken and listen on 9230 instead. To fix this, modify the docker-compose file so the development server is given its own service.
- Loading branch information
1 parent
9455185
commit eb0f709
Showing
4 changed files
with
37 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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 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 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,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
# * | ||
# * This Source Code Form is subject to the terms of the Mozilla Public | ||
# * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
# * | ||
|
||
# If we're in a container, pass '--host' flag so server remains | ||
# accessible outside the container. | ||
extra_args= | ||
if [ -f /.dockerenv ]; then | ||
# This is passed to vite, which exposts the port to the | ||
# host (outside the container) | ||
extra_args="--host" | ||
fi | ||
|
||
npm run client:dev -- $extra_args |
This file contains 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