LoginSignup
11
4

More than 5 years have passed since last update.

heroku fork is deprecated and will be sunset 2017-12-01

Posted at

本日 2017/12/01 を以て Heroku Fork は終了となります。

Heroku Fork ってなに?

似たような Heroku 環境を構築する時に便利なやつです。

$ heroku fork --from sourceapp --to targetapp
Creating fork targetapp... done
Copying slug... done
Adding heroku-postgresql:dev... done
Creating database backup from sourcapp... .. done
Restoring database backup to targetapp... .. done
Copying config vars... done
Fork complete, view it at http://targetapp.herokuapp.com/

from to を指定して新しいアプリケーションを構築します。

環境変数やaddonsがまるっとコピーされます。

今日からどうすんの?

今日から Heroku Fork が使えません。

適当に ua 環境とかサクッと作りたいときとかどうすれば…ってやつですが、幾つか方法はあるみたいです。

Review Apps を使う

公式で推奨されている方法

紐付いている Github リポジトリに PR を投げるとそこ経由で App を立ててくれる。

Heroku Button を使う

これが一番ラクそう。詳細は過去記事のこちらを。

CLI Plugins

以下のプロジェクトを自分でプラグインとして利用することが出来る。

$ git clone https://github.com/heroku/heroku-fork
Cloning into 'heroku-fork'...
remote: Counting objects: 946, done.
remote: Total 946 (delta 0), reused 0 (delta 0), pack-reused 946
Receiving objects: 100% (946/946), 165.68 KiB | 0 bytes/s, done.
Resolving deltas: 100% (411/411), done.
$ cd heroku-fork/
$ heroku plugins:link
Linking ~/heroku/heroku-fork...
Installing dependencies for ~/heroku/heroku-fork... done
$ heroku plugins
heroku-fork 4.1.25 (link)

動く限りはコレでもなんとか

11
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
4