A tracerbullet for linux development on WSL.
- Be able to develop full stack with debug and watch capability with VSCode DevContainer.
- Produce configurable containers for deployment.
Tested on Windows 10 20H2 OS Build 19042.867.
- Install WSL 2, Ubuntu and Windows Terminal (optional).
- Clone the repo on WSL 2 filesystem.
- On WSL, run
open-dev.shto start VS Code, then click Reopen in Container on each VS Code. - On each VS Code, F5 to launch the app.
- vue-app runs in watch mode. Any changes are HMRed.
- web-api runs in debug mode. You can put breakpoint in VS Code.
- To run web-api in watch mode, you have to stop the debug, and run
dotnet watch run src/web-apion the terminal. - Make sure to put
/vue-appor/web-dotvvmat the end of url, likehttp://localhost:12345/vue-app.
- Make changes.
- Run
build.shto build docker images. - Run
run.shto instantiate docker containers in dev mode.- dev mode in web-api does not redirect http to https.
- Open http://localhost:8082/vue-app and http://localhost:8084/web-dotvvm to see the app running.
- Do git commit/push in WSL console. (That is most simple option.)
When you push, github action triggers pushing new docker images to docker hub. To configure this,
- If you cloned this repo,
- On your github repo's Settings, define 2 secrets: REGISTRY_USERNAME and REGISTRY_PASSWORD
- Modify
.env-docker-hubfirst line,DOCKER_REGISTRYto your REGISTRY_USERNAME value.
- When there is push to github reposotiry,
.github/workflows/docker-image.ymlwill push new image to the docker hub usingpush-docker-images.sh. - Run
run-docker-hub.shto run services using the images from Docker Hub.
- Install ingress following the instruction from https://kubernetes.github.io/ingress-nginx/deploy/
- If needed, modify
set-DOCKER_HOST_IP_ADDR.shto put the desired hostname forDOCKER_HOST_NAMEwhere you want ingress to set up for. - Run
run-k8s.sh