سؤال

my Heroku git repo has two apps. It's configured using fork

So I can deploy to diff servers like this: git push production master git push stage dev:master

And check logs/etc using the --app parameter: heroku logs --app superlongappname-stage heroku logs --app superlongappname

Cool. But typing 'superlongappname-stage' every time I want to work with the staging server is a pain in the ass.

Is there a way to use 'stage' instead of 'superlongappname-stage'? E.g. heroku logs --app stage heroku logs --app production or better yet have stage be the default: heroku logs heroku logs --app production

Thanks!

Mike

هل كانت مفيدة؟

المحلول

What about just renaming your apps? Heroku documentation on it here.

Basically, from your CLI:

heroku apps:rename stage --app superlongappname-stage
heroku apps:rename production --app superlongappname

Note that you'll probably need to use something other than a simple 'stage' or 'production', as it needs to be a unique appname (stage.heroku.com), and I'm guessing stage and production are already taken. The point remains that you can change it to something easy.

Also, remember to update your git remotes. From your git checkout directory:

git remote rm heroku
heroku git:remote -a stage
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top