Showcase dagger build pipeline for Nx repositories.
This example shows a NestJS backend and an Angular frontend. The pipeline builds and publishes two individual containers. Deployment could be done with docker compose. See the deployment-compose.yaml.
- NodeJS 18 or later
- Docker or compatible Container Engine
- Dagger.io CLI
-
npm install
-
dagger run npx ts-node --esm --project dagger/tsconfig.json dagger/build.mts --docker-prefix=your-registry
-
docker compose -f deployment-compose.yaml up
- open localhost:8080
So far one argument can be passed to the build.mts
- docker-prefix (p) : docker registry that you want to push into
Example:
#publish to dockerhub sirion182
dagger run npx ts-node --esm --project dagger/tsconfig.json dagger/build.mts --docker-prefix=sirion182- add test execution into pipeline
- use containers to execute e2e tests
- add Kubernetes deployment example
- improve command line arguments
- choose project to build
- add usage hints
- utilize affected graph of nx
- add example ci integration
- Github Action
- Gitlab Pipeline
- add Secret Handling
