Skip to content
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

auto-update Docker instance after source edits #35

Open
klepsydra opened this issue Oct 27, 2017 · 1 comment
Open

auto-update Docker instance after source edits #35

klepsydra opened this issue Oct 27, 2017 · 1 comment

Comments

@klepsydra
Copy link

Hello, great work! I too prefer to deploy via Docker.

One minor pet peeve was having to stop, rebuild and run the Docker image after any change in code (or git pull).

Here is my new way to launching, after the initial docker build:


$ cd ~/www/robinhood-on-rails 
$  docker run --name=RobinhoodOnRails  -v $HOME/www/robinhood-on-rails:$HOME/robinhood-on-rails  -dt -p 3222:3000 robinhood-on-rails 

Wherein:

  • --name since I don't expect to run multiple instances on the same server. This prevents Docker from assigning random aliases, and simplifies instance management.

  • -p 3222 externalizes to a port other than 3000, which on my server was already taken.

  • -v The main point of this issue. Binds a dir from host to guest, and since Rails is already launched in dev mode, reloads new code on the fly.

I am unsure how to best adapt into the Dockerfile, etc.

@bcwik9
Copy link
Owner

bcwik9 commented Feb 9, 2018

Thanks for posting! As I don't use docker I'll let someone with more experience handle this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants