NorbiPeti
c62925daf7
- Added local DB container - Added scripts to deploy frontend/backend by running the deploy command in the containers - Installing Docker and Heroku CLI in the dev backend container to be able to build and push the container without installing the CLI on the host - Building and pushing the production container to the Heroku Container Registry
22 lines
549 B
Bash
22 lines
549 B
Bash
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
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
|
|
fi
|
|
|
|
echo "Installing packages"
|
|
npm install
|
|
echo "Running application"
|
|
npm run rebuild
|
|
npm run start:watch
|