Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/henriqueweiand/nestjs-job-commander
An example of how to run a job process with NestJS-Commander inside a k8s job.
https://github.com/henriqueweiand/nestjs-job-commander
cli docker k8s monorepo nestjs nestjs-commander postgresql ticketmaster-api typeorm
Last synced: 1 day ago
JSON representation
An example of how to run a job process with NestJS-Commander inside a k8s job.
- Host: GitHub
- URL: https://github.com/henriqueweiand/nestjs-job-commander
- Owner: henriqueweiand
- Created: 2024-09-06T18:25:55.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-09-08T17:41:55.000Z (3 months ago)
- Last Synced: 2024-11-10T04:11:29.149Z (about 1 month ago)
- Topics: cli, docker, k8s, monorepo, nestjs, nestjs-commander, postgresql, ticketmaster-api, typeorm
- Language: TypeScript
- Homepage:
- Size: 272 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NestJS-Job-Commander
An example of how to run a job process with NestJS-Commander inside a k8s job.
**_ Technologies applied _**
- NestJS
- Nest-commander
- TypeORM
- K8S
- Monorepo### How to run
1. install packages
2. run docker with `docker-compose up -d`
3. create tables `yarn migration:run`
4. run `nest start --watch -- cli event-refresh --provider=ticketmaster`### Running inside k8s
1. Create the image `docker build -t ticketmaster-event-refresh-job .`
2. Create config map `kubectl create configmap env-config --from-env-file=.env`
3. After creating the config map, update the HOST and create a NODE_ENV with the following values:```
CLI-ENRICHER.HOST=host.docker.internal
NODE_ENV=production
```4. Inside k8s folder, run `kubectl apply -f cronjob.yaml`
### Application overview
![Preview](https://github.com/henriqueweiand/nestjs-job-commander/blob/master/assets/overview.png)
### Possible updates
- K8S get both project and root envs;