SweetDeals is a complete heavy Javascript/Typescript-oriented application, built for demonstration & educational purposes.
-
The full circle of software development
-
A complete, or full-stack so to say, javascript application
- TypeScript integration - the benefit & the tax
- How Fuse-Box can be an agreeable alternative to webpack
- Mongodb, ExpressJS, React Server-side Rendering
-
Testing a full-stack javasript application
-
QA/QC, what to do from the point of the developers
-
DevOps workflow, including CICD and Deployment
- Branch master must be strictly protected!
- Feature implementation must be carried out on a separate branch
- Each commit must be linted locally
- If dev tries to commit on master branch, use husky to auto switch to a new feature-branch
- To merge to master branch, a PullRequest must be submitted
- Implement frontend test with Mocha & React-testing-library
- Each Pull-Request will be verifed with automation of testing & bundling
- If successful, allow to merge to Master
- Deploy with Kubernetes
- Auto deploy upon merging to master
Prepare the very first image for the initial deployment with kubernetes
$ docker login
$ docker build -t vutrio/sweetdeals-image-demo:latest .
$ docker push vutrio/sweetdeals-image-demo:latest
Save the K8s DigitalOcean config as ~/.kube/config
Check if config is properly set?
$ kubectl config view
PS: dont forget to save the config/secret files to SemaphoreCI Secrets If ok, set Database Secret for K8s Database service
$ kubectl create secret generic prod-db-secret --from-literal=user=root --from-literal=password=1234 --from-literal=dbname=prod
Create Docker secret namely regcred for K8s to pull the private image
$ kubectl create secret docker-registry regcred --docker-server=https://index.docker.io/v1/ --docker-username=DOCKER_USER --docker-password=DOCKER_PASSWORD --docker-email=DOCKER_EMAIL
Apply with K8 to launch the fucking App
$ kubectl apply -f k8s/
to be done... once project finished.