Environment Variables

Configuration file#

In order to configure InstaMate, a configuration file has to be created.

For example you can create a file called env with the following content:

INSTAMATE_HOST=0.0.0.0
INSTAMATE_PORT=8080
GRAFANA_PORT=3000
SESSION_SECRET=Your Session Secret goes here
POSTGRES_URI=database
POSTGRES_USER=instamate
POSTGRES_PASSWORD=secret
POSTGRES_DB=instamate
POSTGRES_PORT=5432
FACEBOOK_APPLICATIONID=1234567890
FACEBOOK_APPLICATIONSECRET=abcdef1234567890
FACEBOOK_API_URL=https://graph.facebook.com/v9.0
FACEBOOK_CALLBACK_URL=https://aaaaaaaaa.ngrok.io/auth/facebook/callback
CRON_REELS_ENABLED=0
CRON_REELS_SEQUENCE=0 * * * *
CRON_REELS_ERROR_TIMER=8
CRON_LIFETIME_ENABLED=1
CRON_LIFETIME_SEQUENCE=0 */12 * * *
CRON_LIFETIME_ERROR_TIMER=2
CRON_STORIES_ENABLED=1
CRON_STORIES_SEQUENCE=*/15 * * * *
CRON_STORIES_ERROR_TIMER=1
CRON_INSIGHTS_ENABLED=1
CRON_INSIGHTS_SEQUENCE=*/15 * * * *
CRON_INSIGHTS_ERROR_TIMER=1
CRON_MEDIA_ENABLED=1
CRON_MEDIA_SEQUENCE=*/5 * * * *
CRON_MEDIA_ERROR_TIMER=1

Set all variables with the expected values related to your environment.

Environment variables for runtime configuration#

Variable NameDescriptionDefault value
INSTAMATE_HOSTHosts allowed to connect to the web interface0.0.0.0
INSTAMATE_PORTPort of the web interface8080
GRAFANA_PORTPort of the Grafana interface3000
SESSION_SECRETSecret phrase used to secure your web sessionYour Session Secret goes here
POSTGRES_URIURI of the postgresql database. In Docker, replace the IP/hostname with the container namedatabase
POSTGRES_USERUser to connect to the databaseinstamate
POSTGRES_PASSWORDPassword of the usersecret
POSTGRES_DBDatabase name to store datainstamate
POSTGRES_PORTDatabase port exposed5432
FACEBOOK_APPLICATIONIDApplication ID from the Facebook developper siterequired
FACEBOOK_APPLICATIONSECRETApplication secret from the Facebook developper siterequired
FACEBOOK_API_URLURI to connect to the Facebook APIhttps://graph.facebook.com/v9.0
FACEBOOK_CALLBACK_URLCallback URL once the login is successful. The value is mandatory in order to get the authorization token. Once the token is stored, the value is not required anymorerequired for the first login
CRON_REELS_ENABLEDActivate a cron job to parse ?a=1 request to extract Reels information0
CRON_REELS_SEQUENCECron sequence to execute the job0 * * * *
CRON_REELS_ERROR_TIMERCount to hold requests when an error occured8
CRON_LIFETIME_ENABLEDActivate a cron job to lifetime insights1
CRON_LIFETIME_SEQUENCECron sequence to execute the job0 /12 * *
CRON_LIFETIME_ERROR_TIMERCount to hold requests when an error occured2
CRON_STORIES_ENABLEDActivate a cron job to stories insights1
CRON_STORIES_SEQUENCECron sequence to execute the job/15 * * *
CRON_STORIES_ERROR_TIMERCount to hold requests when an error occured2
CRON_INSIGHTS_ENABLEDActivate a cron job to media advanced insights1
CRON_INSIGHTS_SEQUENCECron sequence to execute the job/15 * * *
CRON_INSIGHTS_ERROR_TIMERCount to hold requests when an error occured2
CRON_MEDIA_ENABLEDActivate a cron job to media basic insights1
CRON_MEDIA_SEQUENCECron sequence to execute the job/5 * * *
CRON_MEDIA_ERROR_TIMERCount to hold requests when an error occured2