-
Notifications
You must be signed in to change notification settings - Fork 62
Added Docker environment setup #132
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM node:17 | ||
|
||
WORKDIR /webide | ||
ADD . . | ||
RUN npm install | ||
Comment on lines
+4
to
+5
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To use layer caching more efficiently, the best practice is to first Also please use |
||
|
||
CMD node serve.js --compile |
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -31,6 +31,12 @@ Online editor / visualizer for Kaitai Struct .ksy files | |||||||
- `node serve.js --compile` | ||||||||
- Go to [http://127.0.0.1:8000/](http://127.0.0.1:8000/) | ||||||||
|
||||||||
## run in docker container | ||||||||
- Install docker and docker-compose | ||||||||
- `git clone --recursive https://github.com/kaitai-io/kaitai_struct_webide` | ||||||||
- `docker-compose build && docker-compose up -d` | ||||||||
- Go to [http://localhost:8000/](http://localhost:8000/) | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please use The "automatic reload when a local change is detected" feature works only for the kaitai_struct_webide/src/autorefresh.ts Lines 6 to 7 in a8f6f9c
Also using localhost instead of 127.0.0.1 caused some 1 sec delay (but I have no idea what the cause was, and whether it still persists), see kaitai_struct_webide/serve_files.py Line 116 in fdc13bb
(this is a different file for different purpose, unused by the current Web IDE version, but whatever) Actually for the "automatic reload" to work and also for easier development, it would be nice if the Docker image didn't have to be manually rebuilt every time a change is made to the source files. This is certainly achievable with Docker using bind mounts, see https://docs.docker.com/get-started/06_bind_mounts/.
|
||||||||
|
||||||||
## screenshots | ||||||||
|
||||||||
 | ||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: "3.9" | ||
services: | ||
webide: | ||
build: ./ | ||
ports: | ||
- "8000:8000" |
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.
Please use
instead. See https://nodejs.org/en/about/releases/ - odd-numbered (9, 11, etc.) releases become unsupported after 6 months and their use in production is discouraged.