Skip to content

Server deployment

Oleksandr Krynytskyi edited this page Mar 2, 2020 · 8 revisions

This page describes the steps required to deploy a GreenCity application to different Platform-as-a-Service systems.

IMPORTANT! DO NOT FORGET TO CHANGE THE PROFILE IN application.properties!!!

Option 1: Heroku

  1. Create a file Procfile to your forked project that contains the needed configuration:
    web java -Dserver.port=$PORT $JAVA_OPTS -jar target/greencity-0.0.1-SNAPSHOT.jar --spring.profiles.active=prod
  2. Sign up for Heroku and log in.
  3. Go to New → Create a new app and enter your app name. After this click a “Create an app”.
  4. Log in to your Heroku CLI using a command: $ heroku login
  5. Add the heroku remote to your forked repository using a Heroku CLI:
    $ heroku git:remote -a YOUR_APP_NAME
  6. Go to Overview → Configure Add-ons → Find more add-ons → In search find Heroku Postgres and Install → Select your app to provision → Click “Provision Add-on”.
  7. Go to Settings → Reveal Config Vars and set your environment variables.
  8. If you are done, then with confidence you can to Heroku using a command:
    $ git push heroku master
  9. Hooray! You are all set!

Option 2: Google Cloud Platform

TODO: Will be soon…