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

Docker: Rerun puma/lineman when relevant files change #3594

Merged
merged 5 commits into from Jul 21, 2017

Conversation

Projects
None yet
2 participants
@nilbus
Member

nilbus commented Jul 20, 2017

With no code reloading functionality in Sinatra, this I think is the next-best thing.

There is necessarily downtime after each .rb file change, while puma restarts. Modified .js/.coffee files take a few seconds to go into effect. Changes to .erb files go into effect immediately.

Restarting Lineman is a hack. Lineman really ought to instead be doing its own reloading. It watches and compiles the files but doesn't put them in the right places to be effective. I have not spent the time to learn lineman well enough to fix it. Instead as a workaround, restart lineman, because starting lineman puts everything in its right place. See #2936 (comment)

Based on #3592 to avoid conflicts.

nilbus added some commits Jul 19, 2017

Upgrade docker-compose format to version 2.1
This enables the use of defaults with variable interpolation.

Followed procedure documented at
https://docs.docker.com/compose/compose-file/compose-versioning/#version-1-to-2x
Use a named Docker volume to better persist data
Otherwise, `docker-compose down' or otherwise removing the postgres
container leaves orphan volumes that will not be reattached
automatically.
Restart the application after each relevant code change
With no code reloading functionality in Sinatra, this I think is the
next-best thing.

There is necessarily downtime after each code change.
Rerun lineman when coffee/js assets change
This is a hack. Lineman really ought to instead be doing its own
reloading. It watches and compiles the files but doesn't put them in the
right places to be effective. I have not spent the time to learn lineman
well enough to fix it.

Instead as a workaround, restart lineman, because starting lineman puts
everything in its right place.

See #2936 (comment)
Update docker documentation
- Front-end dev now works great
- Code changes are automatically applied, usually after a delay
@kytrinyx

This comment has been minimized.

Show comment
Hide comment
@kytrinyx

kytrinyx Jul 21, 2017

Member

I have not spent the time to learn lineman well enough to fix it.

Yeah, I wouldn't recommend going down that route. We're close enough to ditching it that it would not be a good use of time.

This looks good to me!

Member

kytrinyx commented Jul 21, 2017

I have not spent the time to learn lineman well enough to fix it.

Yeah, I wouldn't recommend going down that route. We're close enough to ditching it that it would not be a good use of time.

This looks good to me!

@kytrinyx kytrinyx merged commit 2931c88 into exercism:master Jul 21, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 86.524%
Details

@nilbus nilbus deleted the nilbus:docker-rerun branch Jul 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment