This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## This program accepts an environment name (local, staging, prod) and | |
## expects respective Dockerfiles (for these suported environments) to | |
## exist in specific directory (i.e. `docker/$environment.Dockerfile`). | |
## It will then copy the respective Dockerfile to the root directory, | |
## and build with the Docker images with it, bofore prompting to push | |
## to your account on Docker Hub. | |
ImageName='app-service' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# normally (on Linux) your user / group has the ID 1000 | |
UID=1000 | |
GID=1000 | |
WEBUSER=host-user | |
WEBGROUP=host-group | |
APP_PORT=9000 | |
APP_NAME="My WordPress Website" | |
APP_SERVER_PORT=3000 | |
APP_PREFIX=my-website |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### assign variables from CLI (posibional arguments) | |
first_user_arg="$1" | |
second_user_arg="$2" | |
third_user_arg="$3" | |
### have a default value to fallback on: | |
first_user_arg=${first_user_arg:-"default 1st value"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# run `gupdate` to safely update your local branch | |
alias gfetch="git fetch origin && git pull origin --ff-only" | |
alias gpull="git pull origin --ff-only" | |
alias grebase="git pull origin --rebase" | |
alias gupdate="gfetch && gpull || grebase || git stash && grebase || echo \"encountered issues\" && git pop" | |
function gstash() { | |
if [[ -n $1 ]]; then |