Closed Bug 1478066 Opened 7 years ago Closed 7 years ago

[docker] Re-architecture dev environment

Categories

(Webtools Graveyard :: Pontoon, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: adrian, Assigned: adrian)

Details

Attachments

(1 file)

Code sharing between the developer's repo and the docker container is a mess right now. It relies heavily on symlinks, and on building dependencies outside the application folder, which causes a lot of bugs, a lot of questions, and a lot of headaches for me. We can take a different approach. Instead of sharing the root folder with the container, and isolating all dependency elements (think node_modules, build folders... ), we can instead share only the sub-folders in which there's code that is likely to change during development. That way, the application folder is copied once during build, and then only a few folders are mounted as volumes in the container. Those folders are: /pontoon /tests /frontend/src /frontend/public This is a trade-off. It is much easier to maintain and should work a lot better in all environments. But, that means that changes happening outside those 4 folders won't be reflected in your running container, until you actually rebuild the image of that container. Given that edits outside the aforementioned folder are rare and usually don't impact the running webapp, I believe that is pretty good trade-off and I'm very willing to take it.
Commit pushed to master at https://github.com/mozilla/pontoon https://github.com/mozilla/pontoon/commit/67c22a33565385f1aca3a73fb7642c6f85435898 Fix bug 1478066 - Use volumes instead of symlinks in docker dev envir… (#1024) * Fix bug 1478066 - Use volumes instead of symlinks in docker dev environment. * Use docker-compose everywhere possible. This also removes the new useless run_tests_in_docker.sh file, that was quite inconsistent with our use of the Makefile. Everything is a lot more streamlined and simple now.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: