veem-web-sdk
v0.0.44
Published
## Documentation 1. [Getting started](https://github.com/aligncommerce/embed-widgets/blob/qa/docs/getting-started.md) 1. [Development](https://github.com/aligncommerce/embed-widgets/blob/qa/docs/development.md) 1. [Testing](https://github.com/aligncommerc
Readme
embed-widgets
Documentation
~/.nvm/install.sh export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" # This loads nvm bash_completion
nvm install 14.19.1 nvm use 14.19.1
set environment variables
SERVICE=embed-widgets ENV=sb ACT=769698251360
ENV=qa ACT=766343100809
Buyild/Deploy Local
export NODE_OPTIONS=--max_old_space_size=32192 export NODE_ENV=production export GENERATE_SOURCEMAP=false npx webpack --config ./webpack.config.babel.js --env=$ENV --no-devtool
package.json "scripts": { "build": "GENERATE_SOURCEMAP=false react-scripts build" }
login to public ecr to get base image
awsve dev -- aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/y6p6g2e4
Login to dev ecr to push image
awsve $ENV -- aws ecr get-login-password --region us-west-2 | awsve $ENV -- docker login --username AWS --password-stdin $ACT.dkr.ecr.us-west-2.amazonaws.com awsve $ENV -- aws eks --region us-west-2 update-kubeconfig --name $ENV-eks
UNAME=jrveemba [unique to developer]
build docker image
docker build .
--file Dockerfile
--build-arg ENV_NAME=$ENV
--build-arg SERVICE_NAME=$SERVICE
--tag $ACT.dkr.ecr.us-west-2.amazonaws.com/$SERVICE:$UNAME-local-$ENV
if successful you will see image in docker desktop. you can start the container to run locally
push image to ECR
docker push $ACT.dkr.ecr.us-west-2.amazonaws.com/$SERVICE:$UNAME-local-$ENV
change deployment image on dev server, this will restart service with new image
awsve $ENV -- kubectl set image deployment/$SERVICE -n services $SERVICE=$ACT.dkr.ecr.us-west-2.amazonaws.com/$SERVICE:$UNAME-local-$ENV
viewing logs
First find out the pod name, you can the get pod status ad view logs awsve qa -- kubectl get pods -n services
POD=customer-756fd88dd6-xzxxx
awsve dev -- kubectl get pod $POD -n services
awsve dev -- kubectl get pod $POD -n services -o=custom-columns='IMAGE:spec.containers[*].image'
awsve dev -- kubectl logs $POD -n services
