chmura-zajecia-gitea-heroku/deploy.sh

27 lines
587 B
Bash
Raw Permalink Normal View History

2025-01-07 20:06:44 +01:00
#!/bin/bash
# App name
APP_NAME=s464951-gitea
2025-01-07 21:12:07 +01:00
heroku create --stack container --region eu $APP_NAME --json
APP_URL=$(heroku info -s | grep web_url | cut -d= -f2)
2025-01-07 20:06:44 +01:00
2025-01-07 21:12:07 +01:00
echo $APP_URL > app_url.txt
2025-01-07 20:23:38 +01:00
2025-01-07 21:12:07 +01:00
heroku addons:create heroku-postgresql:essential-0 --app $APP_NAME
2025-01-07 20:35:59 +01:00
echo "Waiting for Heroku Postgres to be fully provisioned..."
heroku pg:wait --app $APP_NAME
2025-01-07 20:23:38 +01:00
2025-01-07 21:52:56 +01:00
echo DB_URL
heroku config:get DATABASE_URL -a $APP_NAME
2025-01-07 21:44:23 +01:00
2025-01-07 20:06:44 +01:00
# 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
2025-01-07 21:52:56 +01:00
heroku open --app $APP_NAME