Last active
April 17, 2022 16:13
-
-
Save SanariSan/9015ddeea5122950b8265335eefa89d3 to your computer and use it in GitHub Desktop.
heroku
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout -b master | |
git add . | |
git commit -m "build" | |
heroku login | |
heroku create <app_name> | |
heroku git:remote -a <app_name> | |
heroku addons:create heroku-postgresql | |
heroku config:set PGSSLMODE=require | |
//heroku config:set PGSSLMODE=no-verify (?) | |
//heroku keys:add (?) | |
heroku config | |
// => | |
// DATABASE_URL: postgres://login:pass@host:port/dbname | |
// PGSSLMODE: require | |
// DATABASE_URL = log:pass:host:port/dbname ; put it to connection | |
// .js file with connection | |
// ------------------------------ | |
// typeorm, createConnection({ | |
// type: "postgres", | |
// "host": "", | |
// "port": 1234, | |
// "username": "", | |
// "password": "", | |
// "database": "", | |
// ssl: { | |
// rejectUnauthorized: false, | |
// }, | |
// entities: [] | |
// }) | |
git push heroku master | |
//... | |
heroku logs --tail | |
//stop long build | |
heroku plugins:install heroku-builds | |
heroku builds -a <app_name> | |
heroku builds:cancel <build_id> -a <app_name> | |
// check running apps | |
heroku ps -a <app_name> | |
//restart | |
heroku ps:kill | |
//stop | |
heroku ps:scale web=0 | |
heroku maintenance:on | |
//resume | |
heroku ps:scale web=1 | |
heroku maintenance:off | |
//local run | |
heroku local --port 1234 -e .env |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment