-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat(task-runner): New task runner package and dashboard #4
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@wpf500 I still have to fix a few small bugs and update the documentation, but otherwise the PR is ready for review. But let's take another look at it together |
Closing this PR, it will remain as a reference as we bring in the relevant changes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Work
New Services in
docker-compose.yml
redis
serviceNew apps
apps/cli
- A cli to generate index files, build the packges, deploy a new instance and moreapps/task-runner-dashboard
- The task runner dashboardapps/task-runner-worker
- The task runner workerNew packages
packages/config
- Contains the app configuration codepackages/core
- Contains the corepackages/locales
- Moved thei18n
related code into this packagespackages/models
- Contains the TypeORM modelspackages/task-runner
- Contains shared code between the task runner dashboard, task runner worker and backend.New docker images
docker/deno-node
image to be able to use both: Node.js and Denodocker/workspace
image to build the complete workspace. This is used to copy the result into the application images.GitHub
deno-node
andworkspace
image are now always built first and published with the same version, the remaining images then use this version as a basis.docker-compose.yml
yarn docker:build:local
.CLI
index.ts
files. An LLM also ported the new-instanze script here for me, so it wasn't a big effort.Task Runner Worker
A simple application that waits for new jobs and processes them. Currently, everything is simply executed in the same process of the Node.js application. Since Node.js can only use one CPU core, this could lead to problems with a large number of jobs. With
BullMQ
this could also be outsourced to separate processes, but I don't think we need that at the moment.Task Runner Dashboard
Also a simple application that uses bull-board, so far without much customization, but would be possible. The password protection is currently a fixed user, but the authentication of beabee could perhaps be used here if this is to become public.
Docker Deno and Node.js Image
Our workspace currently requires Node.js and Deno. Unfortunately, I could not get both to run with alpine, so this image is based on debian, but is currently only used for building and not for runtime.
Docker Workspace Image
Because we now have many apps that use the same packages (which themselves also have dependencies among each other), the same packages always had to be built in every image. That's why I introduced the
workspace
image, which builds everything once and the other images copy out what they need. I have also customized the GitHub Actions so that the deno-node and workspace image are built and published first and the others then use them.Models
I created the models package because they have to be built with the typescript compiler. esbuild is lightning fast in contrast to the TypeScript compiler, but has no information about the types used. Since TypeORM uses the experimental decorators of TypeScript and not the new ones of the JavaScript standard, the types information is needed for this, which esbuild cannot do. For this reason, we build the models with the typescript compiler. This way, the models in the apps can still be used with esbuild.
Version
Since everything is now always released and deployed together, we should bring all apps and packages to the same version number.
beabee-common
is currently the only outlier here with version0.21.0
, so I suggest bringing everything to version0.22.0
. Alternatively, we could rename@beabee/beabee-common
to@beabee/common
(here, common is also the only outlier with the name) and then set everything to version0.16.0
.Why so many changes?
This was not planned and has the following reasons:
task-runner-worker
with ESM and uses the core.Potential for improvement
core
package requires theconfig
package and loads the config from the corresponding environment variables. It would be better if the config object could be passed to the core module.express
for this, so it should be possible to move the corresponding code to a separate package and then use it