brew install zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
chsh -s /bin/zsh
#!/bin/bash | |
PARAMATER="laravel-env" | |
REGION="eu-central-1" | |
WEB_DIR="/var/www/laravel" | |
WEB_USER="www-data" | |
# Get parameters and put it into .env file inside application root | |
aws ssm get-parameter --with-decryption --name $PARAMATER --region $REGION --query Parameter.Value | sed -e 's/^"//' -e 's/"$//' -e 's/\\n/\n/g' -e 's/\\//g' > $WEB_DIR/.env |
brew install zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
chsh -s /bin/zsh
import { SSM } from "aws-sdk"; | |
const getParameterWorker = async (name:string, decrypt:boolean) : Promise<string> => { | |
const ssm = new SSM(); | |
const result = await ssm | |
.getParameter({ Name: name, WithDecryption: decrypt }) | |
.promise(); | |
return result.Parameter.Value; | |
} |
#! /bin/bash | |
ENVS=$(egrep -v '^#' .env | xargs) | |
ARRAY_ENVS=($(echo $ENVS | tr ' ' ' ')) | |
prop="name" | |
APP_NAME="$(node -pe "require('./package.json')['$prop']")" | |
TOTAL="${#ARRAY_ENVS[@]}" | |
TOTAL=$((TOTAL - 1)) |