2021-11-09 21:57:51 +00:00
|
|
|
#!/usr/bin/env bash
|
2021-11-15 19:34:45 +00:00
|
|
|
set -e
|
2021-11-09 21:57:51 +00:00
|
|
|
|
|
|
|
if [ "$COMMAND" == "deploy" ]; then
|
2021-11-15 19:34:45 +00:00
|
|
|
echo Building Docker image
|
|
|
|
docker build -t registry.heroku.com/np-szakdolgozat/web -f Dockerfile-prod .
|
|
|
|
echo Logging in to Heroku
|
|
|
|
heroku login
|
|
|
|
echo Logging in to Container Registry
|
|
|
|
heroku container:login
|
|
|
|
echo Pushing image
|
|
|
|
docker push registry.heroku.com/np-szakdolgozat/web
|
|
|
|
echo Releasing new version
|
|
|
|
heroku container:release web -a np-szakdolgozat
|
|
|
|
exit 0
|
2021-11-09 21:57:51 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Installing packages"
|
|
|
|
npm install
|
|
|
|
echo "Running application"
|
2021-11-10 16:10:20 +00:00
|
|
|
npm run rebuild
|
2021-11-09 21:57:51 +00:00
|
|
|
npm run start:watch
|