Created By Taufiq - 2022
This simple script will check your PM2 process, if there existing PM2 it will stop the process and delete the process then start new PM2 process
install npm PM2 as user or globally
npm install pm2
npm install -g pm2
Created By Taufiq - 2022
This simple script will check your PM2 process, if there existing PM2 it will stop the process and delete the process then start new PM2 process
install npm PM2 as user or globally
npm install pm2
npm install -g pm2
#Pipeline Created by Taufiq - 2022 | |
image: alpine:latest | |
stages: | |
- build-server-stg | |
- deploy-server-stg | |
- build-server-prd | |
- deploy-server-prd | |
################################################ | |
#Staging pipeline configuration : Auto Deployment |
#Apps Setting | |
WEBSOCKET_ENABLED=true | |
LOG_FILE=./vw-data/log | |
LOG_LEVEL=Info | |
## Web vault settings | |
WEB_VAULT_FOLDER=./vw-data/web-vault/ | |
WEB_VAULT_ENABLED=true | |
#Signup Rule |
docker exec <container_name> sh -c 'mongodump --authenticationDatabase admin -u <DB_USER> -p <DB_PASS> --db <DB_NAME> --archive' > /home/ubuntu/db.dump
docker exec -i sh -c 'mongorestore --authenticationDatabase admin -u -p --db --archive' < /home/ubuntu/db.dump
Setting Up mongodump and S3 First, you’ll need the AWS CLI installed and configured with an IAM account that can access the target bucket. You’ll also need to create a bucket that will house the backups.
Source: https://www.howtogeek.com/devops/how-to-set-up-automated-mongodb-backups-to-s3/
variables: | |
IMAGE_NAME: nanajanashia/demo-app | |
IMAGE_TAG: python-app-1.0 | |
stages: | |
- test | |
- build | |
- deploy | |
run_tests: |
# Simple example of CI to build a Docker container and push it to Amazon ECR | |
variables: | |
DOCKER_REGISTRY: 000000000000.dkr.ecr.eu-west-1.amazonaws.com | |
AWS_DEFAULT_REGION: eu-west-1 | |
APP_NAME: ecr_demo | |
DOCKER_HOST: tcp://docker:2375 | |
DOCKER_DRIVER: overlay2 | |
DOCKER_TLS_CERTDIR: "" | |
publish: |
Running your ASP.NET Core (or other) application in Docker using SSL should not be an overwhelming task. These steps should do the trick.
Run the following steps from a Linux terminal (I used WSL or WSL2 on Windows from the Windows Terminal).
It should look something like the content below; call it my-site.conf
or something like that.
### Source Policy IAM | |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"s3:ListBucket", | |
"s3:GetObject" | |
], |