-
Notifications
You must be signed in to change notification settings - Fork 0
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
Enable initial dockerized deployment #7
base: master
Are you sure you want to change the base?
Conversation
* find least viable build environment * add docker-based builder
… adding adapters for db and session store * introduce db adapters * refactor existing cosmosdb stuff into one * add a verrrrry simple memory-based one * introduce session-store adapters * refactor existing cosmosdb stuff into one * shift around secrets and reduce coupling * TCQ_CDB_SECRET is not needed anymore, because if missing defaults to in-memory-stuff
So it is basically done. Dockerized, ready for deployment on any infrastructure, with either persistency in CosmosDB, MongoDB or in-memory. What proved to be really challenging - but in a fun way - was the very old environment:
This is specially challenging for Apple silicon users, because there are no native pre-built NodeJS versions available < 16. So the main idea, was to use docker to have a build environment. This clearly shows, how far the eco system has progressed and what kind of vendor lock-in you get, by relying on a webpack-based tool chain. I'll explain some of my rationales in the PR myself. |
This PR dockerizes the old application, while keeping changes to a minimum. It also includes AWS Copilot-enabled deployment, that currently is manually automatically deployed to https://tcq.staging.tcq-reloaded.tcq.ninja/ .
Design Goals
Non-Design Goals
In making TCQ run anywhere (just like Java :D), I had to expose internally hard-coded values as environment variables. I tried to make this basically still compatible to the old one, i.e. it still defaults to certain hard-coded stuff like
tcq.app
, if certain env variables are not set.Getting rid of Azure-specific stuff, I introduced the concept of adapters, for the DB and the Session Storage, for both in the past CosmosDB has been used. Right now, both can be replaced with non-production-ready memory-based adapters. I'll add mongodb-based ones soonish and I am so far not so happy with the clunky
else-if
structure.TODO