Skip to content

Commit

Permalink
fix: change deploy.sh to adapt it to new config files
Browse files Browse the repository at this point in the history
  • Loading branch information
manekenpix committed Oct 2, 2020
1 parent fc15d17 commit 05e9434
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions tools/autodeployment/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,6 @@ set -x

DOCKER_FILE=docker-compose-production.yml

# Set NGINX FILE + ENV_FILE
if [ $1 = 'production' ]
then
ENV_FILE=env.production
elif [ $1 = 'staging' ]
then
sed -i 's/telescope\./dev\.telescope\./g' ../telescope/nginx.conf
ENV_FILE=env.staging
else
echo $1 is not a valid argument. Please use either production or staging.
exit 1
fi

# Shutdown
cd ../telescope

Expand All @@ -37,6 +24,19 @@ git clone https://github.com/Seneca-CDOT/telescope.git --depth=1
# Deploy
cd telescope/

# Set NGINX FILE + ENV_FILE
if [ $1 = 'production' ]
then
ENV_FILE=env.production
elif [ $1 = 'staging' ]
then
sed -i 's/telescope\./dev\.telescope\./g' nginx.conf
ENV_FILE=env.staging
else
echo $1 is not a valid argument. Please use either production or staging.
exit 1
fi

# Takes the second argument the name of the env file to be used
cp $ENV_FILE .env

Expand Down

0 comments on commit 05e9434

Please sign in to comment.