Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrsauravsahu/mrsauravsahu.github.io
https://github.com/mrsauravsahu/mrsauravsahu.github.io
dotnet kubernetes svelte
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/mrsauravsahu/mrsauravsahu.github.io
- Owner: mrsauravsahu
- Created: 2021-09-19T11:17:40.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-04T09:41:24.000Z (5 months ago)
- Last Synced: 2024-10-14T08:33:56.862Z (3 months ago)
- Topics: dotnet, kubernetes, svelte
- Language: C#
- Homepage: https://mrsauravsahu.in
- Size: 8.55 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# template-monorepo
This is how I'd organize a cross-language monorepo which handles all CI/CD concerns and enables developers to focus on the business solution. This currently has an api service (nestjs on node) & a frontend app (svelte + sapper) which uses SSR.
## deps
You'll need to have [please.build](https://please.build/) installed.
---
## platforms
### macOS
I use [Docker Desktop](https://docs.docker.com/desktop/mac/install/) to run the app locally.### linux
I use [MicroK8S](https://microk8s.io/) to run the app on Linux.
You'll need to install it and also enable the built-in registry to run the app, which can be done with `microk8s enable registry`
---
### inject secrets
```bash
. ./template.envrc
```### create services
to deploy the app, create the services```bash
plz build //apps/...
plz run parallel //apps/api //apps/docs
```### [extra step for linux] push images to docker registry
Because the images need to be on the microk8s docker registry for this to work, we need to push the images manually. (need to try and automate this later)
```
plz run parallel //apps/api:api_push //apps/docs:documentation_push
```### deploy to kubernetes
```
kubectl apply -f ./.cicd # --> creates the kubernetes namespaceplz run parallel //apps/api/k8s:k8s_push //apps/docs/k8s:k8s_push
```### cleanup
```
plz run parallel //apps/api/k8s:k8s_cleanup //apps/docs/k8s:k8s_cleanupkubectl delete -f .cicd
```### access the documentation site
#### on macos
use this command to forward the port from the documentation service
```bash
kubectl port-forward service/docs-svc -n $K8S_NAMESPACE 3000:80
```
you can navigate to `http://localhost:8080`#### on linux
with microk8s on Linux, the services will directly be available on the NodePort so, no need to use port-forward.You can get the port with
```
kubectl -n mrsauravsahu describe apps/docs-svc | grep NodePort
```