Git Product home page Git Product logo

ticketing's Introduction

Microservices Application

Requirements

  • Packages: Node, Docker with Kubernetes.
  • In the system host file make sure you map 127.0.0.0 to ticketing.dev macOS / Linux: /etc/hosts Windows: C:\Windows\System32\Drivers\etc\hosts
  • Reinstall NGINX Ingress if the Kubernetes cluster was reset: https://kubernetes.github.io/ingress-nginx/deploy/#quick-start
  • Make sure that port 80 is not taken by any other program: MacOS / Linux: sudo lsof -i tcp:80 Windows: netstat -aon | findstr :80
  • Recreate Kubernetes secrets (for JWT for example)

Run the app

Start Skaffold (look below) and go to https://ticketing.dev // Purchase on Stripe in test mode: 4242 4242 4242 4242 10/30 123

Kubernetes

To run skaffold:

skaffold dev

To look inside pods (containers) to run a shell inside them

kubectl get pods get the name of the pod kubectl exec -it sh

Tests

To run all tests:

cd auth npm run tests

NPM packaging

To publish a module with NPM:

  • make sure it has a git repo and is fully commited.
  • login to npm: > npm login

npm publish --access public

To patch (update) current version of your module:

npm version patch

The full scenario:

git add . git commit -m "your message" npm version patch npm run build npm publish (alternatively run a custom script in package.json)

After changes in the custom module run:

npm run pub /// this is a script in package.jsom from above npm update @vgticket/common /// inside auth project dir.

NATS Streaming Server

Documentation: docs.nats.io Docker: nats-streaming Library: node-nats-streaming

// For the nats-test create a port-forward setup:

kubectl port-forward <pod_name> 4222:4222 // port on localhost : port of the pod

Stripe

Main account in test mode

Workflow

  • Create a Git branch
  • Make updates in code
  • Push to Github
  • On Github: make a pull request to master branch (will run tests)
  • On Github: if tests passes, merge PR. (will update all images on Dockerhub)
  • [Ad depoloyment step if needed]

ticketing's People

Contributors

vgorbic1 avatar

Watchers

 avatar

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.