diff --git a/base.yml b/base.yml index 041f526..3ab70df 100644 --- a/base.yml +++ b/base.yml @@ -6,7 +6,7 @@ volumes: production_traefik: {} services: - django: &django + django: image: cyber5k/mistborn:latest container_name: mistborn_production_django depends_on: diff --git a/scripts/install.sh b/scripts/install.sh index 1efb7f3..13dfdfa 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -57,19 +57,6 @@ 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 if [ -z "${MISTBORN_DEFAULT_PASSWORD}" ]; then read -p "(Mistborn) Set default admin password: " -s MISTBORN_DEFAULT_PASSWORD @@ -99,6 +86,10 @@ pushd . cd /opt/mistborn git submodule update --init --recursive +# get os and distro +source ./scripts/subinstallers/platform.sh + + # iptables echo "Setting up firewall (iptables)" if [ ! -f "/etc/iptables/rules.v4" ]; then diff --git a/scripts/subinstallers/platform.sh b/scripts/subinstallers/platform.sh new file mode 100755 index 0000000..08e4c00 --- /dev/null +++ b/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"