Coder Social home page Coder Social logo

vutran1710 / sweetdeals Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 1.48 MB

Demonstrating FullStack JavaScript/TypeScript Application

HTML 1.49% TypeScript 75.41% JavaScript 0.73% Shell 1.47% Dockerfile 0.35% SCSS 20.55%
typescript fuse-box react ssr node docker cicd semaphoreci cicd-strategy-flow medium-story

sweetdeals's Introduction

Table of Contents

  1. Introduction

  2. Features

  3. Development & CICD Strategy Flow

    1. Development
    2. PullRequest & CICD
  4. Deployment Tutorial

  5. A great Medium Story...

Introduction

SweetDeals is a complete heavy Javascript/Typescript-oriented application, built for demonstration & educational purposes.

Features

  • 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

Development & CICD Strategy Flow

Quality Control CheckList

  • 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

CICD Implementation CheckList

  • 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

Deployment Tutorial

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/

A great Medium Story

to be done... once project finished.

sweetdeals's People

Contributors

dependabot[bot] avatar vutran1710 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

bboy114crew

sweetdeals's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.