This file contains hidden or 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
stages: | |
- test | |
- build | |
- deploy | |
build: | |
stage: build | |
script: | |
- docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD | |
- docker build -t $CI_REGISTRY/mygroup/myapp:$CI_COMMIT_SHA . |
This file contains hidden or 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 | |
# Default values | |
SSH_PORT=22 | |
# File paths | |
NGINX_SSL_FILTER_PATH="/etc/fail2ban/filter.d/nginx-ssl.conf" | |
NGINX_4XX_FILTER_PATH="/etc/fail2ban/filter.d/nginx-4xx.conf" | |
NGINX_5XX_FILTER_PATH="/etc/fail2ban/filter.d/nginx-5xx.conf" | |
JAIL_LOCAL="/etc/fail2ban/jail.local" |
This file contains hidden or 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 | |
# Default values | |
PORT=22 | |
WITH_PASSPHRASE=false | |
# Parse CLI arguments | |
while [[ "$#" -gt 0 ]]; do | |
case $1 in | |
--server-name) |
This file contains hidden or 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 | |
# Parsing of --saas-domain and --port | |
PORT=3000 # Default port | |
while [[ "$#" -gt 0 ]]; do | |
case $1 in | |
--saas-domain) | |
SAAS_DOMAIN="$2" | |
shift 2 |
This file contains hidden or 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 | |
# Default values | |
SSH_ENABLE=false | |
SSH_PORT=22 | |
SSH_ALLOW_FROM="" | |
RESET=false | |
# Args parsing | |
while [[ "$#" -gt 0 ]]; do |
This file contains hidden or 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 | |
# Variables | |
USERNAME="myuser" | |
SSH_PORT=22 | |
EDIT_SSH_PORT=false | |
SSHD_CONFIG="/etc/ssh/sshd_config" | |
BACKUP_CONFIG="${SSHD_CONFIG}.bak_$(date +%Y%m%d%H%M%S)" | |
# Args parsing |