Configuration
App Environment Variables
For self-hosted installations, it is possible to configure the api with environment variables after running the dokku script.
Note
Replace app_name with the app name configured in the dokku script
Update PARSE_API_PUBLIC_URL
dokku config:set app_name PARSE_API_PUBLIC_URL="https://nearme.yourdomain.com"Update the APP_NAME with the name of your project.
dokku config:set app_name APP_NAME="My awesome app"Enable (1) / disable (0) email verification:
dokku config:set app_name VERIFY_USER_EMAILS="1"Note
Users will receive an email with a verification link. You need to configure Mailgun to send and receive emails (see below).
Setup Parse Keys
Use random.org to generate a set of random strings and update the following values:
dokku config:set app_name PARSE_API_APP_ID="random_string"dokku config:set app_name PARSE_API_MASTER_KEY="secret_string"
dokku config:set app_name PARSE_API_READ_ONLY_MASTER_KEY="secret_read_string"Setup Currency
Any currency code supported by Stripe.
dokku config:set app_name CURRENCY_CODE="USD" CURRENCY_LOCALE="en-US" CURRENCY_DISPLAY="symbol"Setup Language
The language of the web portal is set using the CUSTOM_LANG variable. It supports English (Default), Spanish (es) and Arabic (ar).
For example to change the language to Spanish:
dokku config:set app_name CUSTOM_LANG="es"If you need to add more languages follow these steps:
Create a new json file in the ./locales folder. For example, for the French language, add a file called fr.json based on the contents of the en.json file.
Edit the server.js file by adding the new language in the i18n package configuration:
i18n.configure ({
  locals: ['en', 'es', 'ar', 'fr'],
  defaultLocale: 'en',
  fallbacks: {'en': 'en'},
  directory: __dirname + '/ locals',
  register: global
})Setup Parse Dashboard
The password must be encrypted with the help of a tool like BCrypt-Generator.
Configure user with full permissions (create, read, update, delete):
dokku config:set app_name PARSE_DASHBOARD_USER="admin"dokku config:set app_name PARSE_DASHBOARD_PASS="$2a$12$emtAfkyi..."Configure user with read access only:
dokku config:set app_name PARSE_DASHBOARD_USER_READ_ONLY="subadmin"dokku config:set app_name PARSE_DASHBOARD_PASS_READ_ONLY="$2a$12$emtAfkyi..."Setup Stripe
Update the Stripe keys if you plan to activate paid and promoted listings.
dokku config:set app_name STRIPE_SECRET_KEY="secret_key"dokku config:set app_name STRIPE_WEBHOOK_SECRET="webhook_secret"Setup Mailgun
dokku config:set app_name MAILGUN_API_KEY="secret_key"dokku config:set app_name MAILGUN_DOMAIN="mg.domain.com"dokku config:set app_name MAILGUN_HOST="api.mailgun.net"dokku config:set app_name MAILGUN_FROM_ADDRESS="YourAppName <noreply@yourdomain.com>"dokku config:set app_name MAILGUN_PUBLIC_LINK="https://www.yourdomain.com"Note
When using the EU region, the host should be set to “api.eu.mailgun.net”.
Setup Google Maps
dokku config:set app_name GOOGLE_MAPS_API_KEY="AIzaXXXXXXXXX"Setup notifications
Android
dokku config:set app_name PUSH_ANDROID_FIREBASE_SERVICE_ACCOUNT_FILENAME="project-firebase-adminsdk-xxxxxx-xxxxxxxxxx.json" See more info here.
iOS
dokku config:set app_name PUSH_IOS_BUNDLE_ID="com.domain.app"dokku config:set app_name PUSH_IOS_KEY_ID="XXXXXXXXXX"dokku config:set app_name PUSH_IOS_KEY_FILENAME="AuthKey_XXXXXXXX.p8"dokku config:set app_name PUSH_IOS_TEAM_ID="XXXXXXXXXX"See more info here.
Enable OneSignal (optional)
dokku config:set app_name ONE_SIGNAL_APP_ID="app_id"dokku config:set app_name ONE_SIGNAL_API_KEY="api_key"Sometimes, you would want to use another subdomain like admin, console, portal, etc.
Run the following commands to remove the default subdomain and add a new one:
dokku domains:remove app_name cloud.yourdomain.comdokku domains:add app_name console.yourdomain.comAdd the proper DNS record (console => server_ip) and update the PARSE_API_PUBLIC_URL
dokku config:set app_name PARSE_API_PUBLIC_URL='https://console.yourdomain.com'If for some reason you need to renew the ssl certificate, run the following command:
dokku letsencrypt:enable app_name