Awesome, you’re at the final step. With Intercity, you’ve installed your app server, added your app, configured its domain name, enabled PostgreSQL and added your deploy to key. It’s now time to deploy your app with an easy git push.
Every app hosted with Intercity has its own unique deploy URL. You can find the deploy URL on the Info tab of an app in your Intercity instance.
Add that URL as a remote called “dokku” to the Git repository of your app’s code:
$ git remote add dokku firstname.lastname@example.org:my-app
If you’re deploying a Ruby on Rails app, you probably want your database migrations to be run on every deploy. You can do this by creating a file
lib/tasks/run_migrations.rake in your Rails project with the following content:
Rake::Task['assets:clean'].enhance do Rake::Task['db:migrate'].invoke end
Let’s deploy the app! Commit all your recent changes that you want to deploy and run:
$ git push dokku master
Dokku, the underlying system that Intercity uses to deploy your apps, will now take care of updating your code, running database migrations, do asset compilation and perform a rolling restart of your app.
git push finishes, just browse to the domain name of your app and it should be available.
This is the end of this Getting Started guide. If you have any questions or issues with the use of Intercity, please open an issue on Github.