-
Notifications
You must be signed in to change notification settings - Fork 12
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
improve usability with Docker #71
Conversation
thanks! I've been out on paternity leave but will review and get this merged soon! |
It may also be useful to add |
ok overall these seem like good changes, but I'm not sure if the volume mount is going to work with gulp. Have you tested it? Does the site rebuild in the Docker container every time the file is modified on your file system? |
I tested this on my Ubuntu system (I actually use this setup for writing articles except that I also use |
hmm.. I can't get it to work on a Mac. So, you see the rebuild in the Docker output when you change a file locally? Must be a browsersync issue.... might be related to this browsersync output:
|
I've confirmed that the volume mount works fine, when I change a file in my local app directory it’s "changed" in the container, but the build doesn't trigger. |
For me, it automatically rebuilds. Did you run the
then, the site is automatically reloaded. |
i think this might be a clue https://forums.docker.com/t/gulp-watch-task-not-working-with-docker/86084 |
OK we solved it. had to enable
I think this change should be fine since any potential unknown effect is pretty limited. |
@danthe1st can you confirm that this still works on Ubuntu? If so we'll get this merged in ASAP. Thank you! |
Yes, I confirm it still works for me. |
OK @danthe1st reworded a bit. Going to get this merged now! Thanks again. If you want any change or addition from here just throw in another PR! |
Currently, writing/changing articles with the Docker tooling is a bit annoying as one always needs to rebuild the image when changing something which also requires the
npm install
to execute again.This PR performs the following changes:
Dockerfile
to runnpm install
before copying the files resulting in further executions being able to use a cached image and not runnpm install
again when changing a file.README.md
.--rm
is added to the instructions in theREADME.md
in order to automatically remove the container after it terminates.README.md
. If this command is used and an article is added after starting the server, it automatically reloads the site.potential issues
$PWD
may not be available. It might be a good idea to add instructions for that.other considerations
Since I added
--rm
, it would be possible to give the container a name using the--name
option.