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"
|
2022-05-06 23:56:14 +00:00
|
|
|
npm run clean
|
2021-11-15 21:47:41 +00:00
|
|
|
wait-for-it database:3306 -t 0
|
2021-11-09 21:57:51 +00:00
|
|
|
npm run start:watch
|