-
Notifications
You must be signed in to change notification settings - Fork 122
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
First stab at full build in docker #4482
Conversation
I gave this a try, and it crashed on some of the gulp stuff:
|
(that was after a complete removal of all containers and images) |
@rosskarchner, should be fixed. |
Now it comes up with:
Do I need to set the database in my .env file? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It worked! I was fond of the extend-environment approach, but understand that it was maybe a little too magical.
This feels a little bit too magical to me. I'm also in the for camp above and would vote to make |
I'm fine with this approach, especially since this should once have to be done once per built image. As a side note, I have a very secret branch, that moves the docker builds to alpine-based images and uses a multi-stage build to keep the image size small (and incidentally, has yarn stuff working as well). Would there be interest in me bringing the alpine docker work into this PR (or a separate PR and closing this one)? |
@wpears good branch 11/10 |
@willbarton yeah, I think in most respects it is. Closing! |
Closes #4468
Closes #4462
This is my first stab at running the full build in the backend. From a fresh repo, with the
cfgov-refresh_python
image removed, you should be able to simplydocker-compose up
to end up with working dockerized cfgov. (no front-end stuff, the .env_SAMPLE is copied over by default). The only thing you'd need to do afterwards to check it out atlocalhost:8000
, is run./shell.sh
and./refresh-data.sh
with a dump once inside. This process could be done automatically (say, based on the existence of adata.tar.gz
file or something) but I've elided that for now.Satellite apps are currently unsupported as there are some decisions to be made around what is optional/what should be baked into the image that I didn't want to cloud this PR. That is, should
optional-public
be installed at build time? The argument for is to move all the painful installation stuff into one place and to then have everything available by default, the argument against is to limit the pain of that first image build. I'm more in the for camp, but reasonable people may disagree (and please do with comments on this PR).If installation of the wheels is done at image build time, then, on container startup, we'd walk develop-apps,
pip uninstall
as needed, andpip install -e
each app there. This preserves the ability to locally edit satellites without any mucking around inside the container, while also not affecting anyone who isn't editing satellites.I'll be out for two weeks starting tomorrow 😅 , but I'll likely peep in on this issue to address questions/comments in the evenings over the next fews days.