-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue #451: Configure host address for optional exposure outside …
…container in Docker (#460) * Add Docker support with network exposure * Add Docker support with network exposure * Revise changeset * Update to include optional exposure to devices on local network by updating HOST_BIND env variable
- Loading branch information
1 parent
567b65f
commit 36913a4
Showing
2 changed files
with
31 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
'srcbook': patch | ||
--- | ||
|
||
Added configurable network exposure for Docker deployments with secure defaults. This includes: | ||
|
||
- Added docker-compose.yml with configurable network binding | ||
- Default configuration restricts access to localhost (127.0.0.1) for security | ||
- Optional network exposure via HOST_BIND environment variable | ||
- Configured port 2150 mapping for Docker container | ||
|
||
Users can optionally expose their Srcbook instance to other network devices by setting HOST_BIND=0.0.0.0 when running Docker. |
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,19 @@ | ||
version: '3' | ||
services: | ||
srcbook: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
ports: | ||
- "${HOST_BIND:-127.0.0.1}:2150:2150" | ||
volumes: | ||
- type: bind | ||
source: ~/.srcbook | ||
target: /root/.srcbook | ||
bind: | ||
create_host_path: true | ||
environment: | ||
- NODE_ENV=production | ||
- HOST=${HOST_BIND:-127.0.0.1} | ||
- SRCBOOK_INSTALL_DEPS=true | ||
command: ["pnpm", "start"] |