Browse Source

Merge branch 'node' into 'master'

Node

See merge request cyber5k/mistborn!2
merge-requests/3/head
Steven Foerster 6 years ago
parent
commit
8359a15e06
  1. 2
      base.yml
  2. 17
      scripts/install.sh
  3. 14
      scripts/subinstallers/platform.sh

2
base.yml

@ -6,7 +6,7 @@ volumes:
production_traefik: {} production_traefik: {}
services: services:
django: &django django:
image: cyber5k/mistborn:latest image: cyber5k/mistborn:latest
container_name: mistborn_production_django container_name: mistborn_production_django
depends_on: depends_on:

17
scripts/install.sh

@ -57,19 +57,6 @@ echo -e "| | | | \__ \ |_| |_) | (_) | | | | | |"
echo -e "|_| |_|_|___/\__|_.__/ \___/|_| |_| |_|" echo -e "|_| |_|_|___/\__|_.__/ \___/|_| |_| |_|"
echo -e "" echo -e ""
# Get OS info
# Determine OS platform
UNAME=$(uname | tr "[:upper:]" "[:lower:]")
DISTRO=""
# If Linux, try to determine specific distribution
if [ "$UNAME" == "linux" ]; then
# use /etc/os-release to get distro
DISTRO=$(cat /etc/os-release | awk -F= '/^ID=/{print $2}')
fi
echo "UNAME: $UNAME"
echo "DISTRO: $DISTRO"
# INPUT default admin password # INPUT default admin password
if [ -z "${MISTBORN_DEFAULT_PASSWORD}" ]; then if [ -z "${MISTBORN_DEFAULT_PASSWORD}" ]; then
read -p "(Mistborn) Set default admin password: " -s MISTBORN_DEFAULT_PASSWORD read -p "(Mistborn) Set default admin password: " -s MISTBORN_DEFAULT_PASSWORD
@ -99,6 +86,10 @@ pushd .
cd /opt/mistborn cd /opt/mistborn
git submodule update --init --recursive git submodule update --init --recursive
# get os and distro
source ./scripts/subinstallers/platform.sh
# iptables # iptables
echo "Setting up firewall (iptables)" echo "Setting up firewall (iptables)"
if [ ! -f "/etc/iptables/rules.v4" ]; then if [ ! -f "/etc/iptables/rules.v4" ]; then

14
scripts/subinstallers/platform.sh

@ -0,0 +1,14 @@
#!/bin/bash
# Get OS info
# Determine OS platform
UNAME=$(uname | tr "[:upper:]" "[:lower:]")
DISTRO=""
# If Linux, try to determine specific distribution
if [ "$UNAME" == "linux" ]; then
# use /etc/os-release to get distro
DISTRO=$(cat /etc/os-release | awk -F= '/^ID=/{print $2}')
fi
echo "UNAME: $UNAME"
echo "DISTRO: $DISTRO"
Loading…
Cancel
Save