#!/bin/bash -e export DATABASE_HOST=${DATABASE_HOST:-"localhost"} export SIDEKIQ_REDIS_URL=${SIDEKIQ_REDIS_URL:-"redis://localhost:6379/0"} if [[ "$#" != "1" ]] ; then echo "Argument count mismatch. 1 and only 1 argument expected" exit -1 fi SVRTYPE="$1" if test "$SVRTYPE" == "front"; then echo "*** FRONT SERVER SELECTED" elif [[ "$SVRTYPE" == "worker" ]] ; then echo "*** WORKER SERVER SELECTED" else echo "server type must be front or worker" exit -2 fi # mandatory packages and distribution upgrade apt-get update && apt-get dist-upgrade apt-get install -y wget sudo build-essential # ruby echo "==== Installation de Ruby 2.3" cat > /etc/apt/sources.list.d/bearstech.list < /etc/apt/sources.list.d/nodesource.list </dev/null 2>&1 && echo "Mot de passe PG correct" || echo "ATTENTION : connexion impossible" ./deploy-helper.sh setup echo "!!! Configuration intiale terminée. Vous pouvez maintenant déployer l'applicatif"