#!/bin/bash # App name APP_NAME=s464951-gitea heroku create --stack container --region eu $APP_NAME --json APP_URL=$(heroku info -s | grep web_url | cut -d= -f2) echo $APP_URL > app_url.txt heroku addons:create heroku-postgresql:essential-0 --app $APP_NAME echo "Waiting for Heroku Postgres to be fully provisioned..." heroku pg:wait --app $APP_NAME echo DB_URL heroku config:get DATABASE_URL -a $APP_NAME # Push to Heroku heroku git:remote --app $APP_NAME git add . git commit -m "Deploy to Heroku" git push heroku main # Open the app in the browser heroku open --app $APP_NAME