Szakdolgozat/backend/docker.sh

24 lines
578 B
Bash
Raw Normal View History

2021-11-09 21:57:51 +00:00
#!/usr/bin/env bash
set -e
2021-11-09 21:57:51 +00:00
if [ "$COMMAND" == "deploy" ]; then
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"
npm run clean
wait-for-it database:3306 -t 0
2021-11-09 21:57:51 +00:00
npm run start:watch