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

Add support for front-end development to docker setup #2936

Closed
toolness opened this issue Jun 5, 2016 · 4 comments
Closed

Add support for front-end development to docker setup #2936

toolness opened this issue Jun 5, 2016 · 4 comments

Comments

@toolness
Copy link

toolness commented Jun 5, 2016

Currently, the docker support added in #2760 is only for the back-end, as we ran into some lineman issues when adding support for front-end development.

My hunch is that these issues are actually independent of docker, but I'm not sure, as I've only been developing exercism using docker--I don't actually have a non-docker environment configured, so I can't compare.

But as I mentioned in #2760 (comment), it seems as though this is the key challenge:

... based purely on what I can observe, it seems as though lineman run does copy files to public when it starts, but it no longer continues to copy them afterwards as it watches the files for changes, which is unfortunate.

Once we can figure out how to make lineman run continuously copy files to public as they change (or once we find out about some different command that does the same thing) then front-end development should work on docker.

Alternatively, another option is to ditch lineman entirely, which @kytrinyx suggested in #2760 (comment).

@kytrinyx
Copy link
Member

kytrinyx commented Jun 5, 2016

I would support ditching lineman for something that many more people are familiar with.

@kytrinyx
Copy link
Member

We're doing a redesign from the ground up: exercism/discussions#113

At this point I think that it probably wouldn't make sense to replace lineman in this app. When we reimplement we will not be using lineman. I'm going to go ahead and close this.

@nilbus
Copy link

nilbus commented Jul 15, 2017

Picking up an old thread…

Your hunch was correct—this was not a docker-specific issue. Lineman only copied the files when first running lineman run. I may recall that it did update the files if browsing the site using port 8000, but not 4567, but that was a while ago, and I'm not certain.

Regardless, when I also couldn't figure out how to configure lineman properly, the hack I got working was to use the rerun gem to execute lineman run each time the relevant files changed.

rerun --pattern '{**/*.coffee,**/{script,stats}.js}' -- lineman run

I did the same for restarting puma after altering files that require an app restart:

rerun --ignore='{**/*.{scss,css,js,coffee,erb},test/**}' 'puma -p 4567'

Since this works and we haven't come up with a better solution yet, I'm going to try to get this working in our Docker image.


Other things I'd like to address:

  • Create an automated build on DockerHub, so users can pull the latest exercism/exercism.io for a near-instant getting-started experience.
  • Investigate issues reported by Windows users.

@kytrinyx
Copy link
Member

Since this works and we haven't come up with a better solution yet, I'm going to try to get this working in our Docker image.

👍 that's some good debugging there! Thanks

nilbus added a commit to nilbus/exercism.io that referenced this issue Jul 20, 2017
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 exercism#2936 (comment)
nilbus added a commit to nilbus/exercism.io that referenced this issue Jul 20, 2017
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 exercism#2936 (comment)
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

3 participants