The parent folder of /src. Please run:
npm install node-nats-streaming ts-node-dev typescript @types/node
tsc -- init
NATS is not used and NATS Streaming Server is used in this application
COPY . .
copies the entire project, recursively into the container for the build.
Step 1:
Step 2: Build an Image
cd ticketing/auth
docker build -t pob944/auth .
docker push pob944/auth
cd ticketing/orders
docker build -t pob944/orders .
docker push pob944/orders
cd ticketing/tickets
docker build -t pob944/tickets .
docker push pob944/tickets
cd ticketing/client
docker build -t pob944/client .
docker push pob944/client
cd ticketing/expiration
docker build -t pob944/expiration .
docker push pob944/expiration
We need to build the image at least once.
Simply adjust the configuration in "infrastructure/k8s" and edit the bottom for all the files.
kubectl create secret generic jwt-secret --from-literal=JWT_KEY=my_key
kubectl create secret generic stripe-secret --from-literal STRIPE_KEY='STRIPE_WEBSITE_SECRET_KEY'
kubectl get secrets
Please for most file you will use the project ID and the timezone is important. The project is using a "Kubernetes clusters" with a standard configuration.
This cloud still use the Docker IDE and the kubernetes must use the correct config file.
gcloud init OR skaffold brew install --cask google-cloud-sdk
The initialization must use the same timezone as the Kubernetes clusters "us-central1-c".
-
Enable "Cloud Build API"
-
Enable - Tools - Cloud Build
Remove/remplace:
- local push: false add "googleCloudBuild" For:
- us-gcr.io/ticketing-dev/<project_name>
Load balancer IP address in GCP - Networking - Load Balancing
sudo nvim /etc/hosts
- Add a domain name associated with Ingress NGINX IP from GCP
gcloud container clusters get-credentials ticketing-dev
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.44.0/deploy/static/provider/cloud/deploy.yaml
Source: https://kubernetes.github.io/ingress-nginx/deploy/#gce-gke
Please do the steps before or the new from the documentation. Otherwise, the application will not work.
skaffold dev
gcloud auth application-default login
From now the Skaffold will push the image on the cloud.
cd ticketing
skaffold dev
EDIT: If unsafe error in browser. type:
thisisunsafe
npm login
npm publish --access public
npm version patch
in nats-test
k port-forward nats-depl-74d4d5f47c-2q74m 4222:4222
npm run listen
Post with POSTMAN
kubectl delete -A ValidatingWebhookConfiguration ingress-nginx-admission