Page MenuHomePhabricator

SVGTranslate's Docker environment doesn't handle node/npm install
Open, Needs TriagePublic

Description

When changing any of the JS or CSS files, symfony expects to rebundle (apparently?) which means that we must run the
./node_modules/.bin/encore production command. But if this is run inside the current docker web shell, it doesn't recognize npm and doesn't have node_modules folder.

Sidebar: Is it possible to work with the JS files directly while debugging in symfony/webpack? It is very useful to add debugger statements, and webpack's bundling removes those anyways. Maybe we can find a good way to have that in the dev environment, or am I missing an already existing way?

Event Timeline

Mooeypoo created this task.Nov 17 2018, 2:58 AM
Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptNov 17 2018, 2:58 AM

@Samwilson Is this ticket still required? Can we put it on the back-burner if it's not urgent anymore?

It's not urgent for me, but I think it's also not far from being done. I've brought the patch up to date with the latest feedback from @davidwbarratt, but the tests are currently failing due to some npm inconsistency โ€” probably not too hard to fix, I'll look at it now and see if we can merge soon.

Samwilson removed Samwilson as the assignee of this task.Feb 12 2019, 8:22 AM
Samwilson moved this task from In Development to Ready on the Community-Tech-Sprint board.

So the tests are now failing on a different problem, and I can't figure it out. It looks to me like the commands for the two containers aren't being run (in Travis) on docker-compose up --build -d. Things work okay locally.

I'll leave this be for now until I think of something else to try. If anyone else wants to pick it up, go for it: https://github.com/wikimedia/svgtranslate/pull/48

This is being done at the same time as T223337.