-
Notifications
You must be signed in to change notification settings - Fork 194
Docker build and other cleanups #1383
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
Conversation
Update the Dockerfile to better use caching by separating the prereq building. Also switch the server to uwsgi rather than using the Mojolicious wrapper. It provided little benefit and caused numerous problems, and we haven't been using it in production for a while.
The main applications is in Catalyst, and using MountPSGI continued to cause problems. Our deployments are moving to uwsgi. Unless the entire app is rewritten in Mojolicious, this is just extraneous code.
Our tests for minion don't really check much, and add a dependency on Postgres. Eventually these tests can return in ingest once it is ready.
This supports ${VAR}, ${VAR:-default}, and ${VAR:+set} variable
replacements to allow overridable config variables.
|
With this merged, tests can be run locally by checking out the repo and running: docker compose --profile test run --build api-test prove -lrv t |
Use a single workflow for docker building and pushing, and use the reusable action to make it standardized. Leaving in a commented out step to update in k8s. Once it is set up, we can uncomment it.
2991ea6 to
092f158
Compare
This repo now has its own docker compose config, so it doesn't need to pull in a separate repo for testing. This simplifies the CI setup, and makes future updates easier as they don't have to coordinate across multiple repos.
oalders
left a comment
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.
I had a quick look and I don't have any concerns. Are the coverage reports still working?
Given where we are at, I'm ok with "move fast and break things" as far as local dev goes. I will try to mess around with the dev env as we merge things to see if I spot any issues.
|
Coverage should still be working fine |
I don't see anything at https://app.codecov.io/gh/metacpan/metacpan-api/tree/haarg%2Fcleanups but that's not so important right now. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1383 +/- ##
==========================================
- Coverage 60.88% 0 -60.89%
==========================================
Files 163 0 -163
Lines 4438 0 -4438
Branches 646 0 -646
==========================================
- Hits 2702 0 -2702
+ Misses 1504 0 -1504
+ Partials 232 0 -232 🚀 New features to boost your workflow:
|
Update the Dockerfile and build process for better caching and to prepare to deploy in Kubernetes.
A docker compose configuration was added to make local testing easier.
Clean up various old files that are no longer relevant.
Switch to precious for formatting and remove formatting test. Replace with a GitHub workflow.
Remove Mojolicious web code. Only Minion and the admin interface remains. Most of the end points were never ported, and MountPSGI ended up being problematic in a number of ways. Production has been switched back to Gazelle for a while now, just using app.psgi. For our other systems deployed in k8s, we're using uwsgi and should be standardizing on it. If someone wants to do a proper port to Mojolicious that could be considered, but it needs to be more complete and would probably only make sense once we're fully disconnected from the ingestion side. We're still using Minion, but it shouldn't be part of the API server.
The CircleCI config has been revised to use the docker compose configuration from this repo rather than pulling it from another. This should make things simpler to update in the future.