-
Notifications
You must be signed in to change notification settings - Fork 4
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
Out with the Nix, in with the Docker #1042
base: master
Are you sure you want to change the base?
Conversation
84b8e24
to
9c9b45c
Compare
@Riscky aside from the points mentioned above, could you give a list of things that need to be done in order for this PR to be ready for review/deploy? I would like to know what the next steps are that need to be taken, and how they are best taken. |
# This key should always exists, otherwise OIDC logins are unsecured | ||
signing_key File.read(ENV['OIDC_SIGNING_KEY']) | ||
if Rails.env.development? then | ||
# FIXME: we can use an actual key in development, but just not when building |
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.
Could you explain why the secret key can't be used here?
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.
We cannot bake the (fake) secret in the build, because we need an actual secret on the server. Since we host the build in a public place, we cannot bake the actual secret in the build (and it would make rotating the secret much harder too).
The correct solution is to put the fake secret in the .env
file and revert the change in this file. I probably had my reasons while developing this, but I don't recall exactly.
I think the most important question to solve is how to bring Simply put, in the current state this PR solves some of the problems we have (Nix is hard to learn, we don't have a single entry point to run the stack), but introduces new problems (no easy way to run service commands). What is the best way forward? This keeps the Nix setup to a very manageable level, makes it easy to run service commands and the stack, and makes the build self-contained. To get there, based on this PR, we'll need to:
|
7f78fd2
to
3e112ae
Compare
Had some time to look at this again, short summary of the current status:
|
Apparently, docker's network_mode host doesn't work on windows and mac, so we probably definitely need to switch to normal networks again (https://docs.docker.com/network/drivers/host/) |
What is the status on this? I have this issue in some other repo's as wel (or well, i technically had no issues but people running mag/win had, but minor detail). Would love to hear the result if a solution has been found! :) |
This PR throws our wonky, broken Nix setup out of the window, and replaces it with Docker.
Now I hear you thinking: "these are not even the same category of software products", and you would be right.
Docker doesn't replace Nix in terms of dependency management, instead we go back to good old apt+bundler+yarn.
But instead of making developers install these pieces of software themselves, we create a nice Docker image that contains all of these.
This makes sure that every developer runs (mostly) the same versions of the dependencies.
It makes setting up Koala a lot easier.
Note that this PR is very much Work In Progress.
The production container is building just fine, but:
webpack-dev-server
container is not doing its job (if you enable it, Koala tries to connect to it, but fails)sidekiq
is still missingThe CI pipeline is brokenI fixed the CI pipeline, and added a second one that can build and publish the docker container. The latter needs testing@Mstiekema, @TobiasDeBruijn, you both expressed interest in helping me out with this PR, so here goes :)