Customize Faction Installation For Self Hosting

If you decide to self host Faction instead of using the Managed Solution then you will need to ensure you include the proper Environment variables so that Faction integrates into your environement.
Custom Environment Variables
Below are all of the Faction Enironment Variables needed to configure your Mongo DB, Secret Keys, and other settings.
## Mongo Database configs
FACTION_MONGO_HOST=127.0.0.1. #requireed
FACTION_MONGO_DATABASE=faction #required
FACTION_MONGO_USER=faction_mongo_user #optional
FACTION_MONGO_PASSWORD=faction_mongo_pass #optional
FACTION_MONGO_AUTH_DATABASE=admin #optional
FACTION_SECRET_KEY=faction_encryption_key #required
FACTION_REPORT_STORAGE=aws #optional
FACTION_BUCKET_NAME=your-bucket #optional
FACTION_TIER=teams #required
FACTION_USERS=100 #optional
FACTION_SMTP_SERVER=smtp.server.com #optional
FACTION_SMTP_USER=sysadmin #optional
FACTION_SMTP_PORT=587 #optional
Mongo Database Settings
- FACTION_MONGO_HOST (Required):
This is the hostname or ip address where your mongo database i location - FACTION_MONGO_DATABASE (Required):
The name of the mongo database. This can be anything you want. On initial loading of the application it will create the database and all collections. - FACTION_MONGO_USER (Optional):
If you use authentication (and you should) then this user has access to the database. - FACTION_MONGO_PASSWORD (Optional):
Only required if you use the FACTION_MONGO_USER environment variable. - FACTION_MONGO_AUTH_DATABASE (Optional):
The default authentication database is admin. If you want to use another then you can use this variable.
Other Settings
- FACTION_SECRET_KEY (Required):
This is the key used for all symmetric key encryption. - FACTION_REPORT_STORAGE (Optional):
This variable has two options: local or aws. If you include aws then you also need to set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY and create the an s3 bucket location in AWS. You can also use IAM permissions instead of including the AWS Keys.
When using local the default directory location is /opt/faction. If this variable is not set, local will be used as default. - FACTION_BUCKET_NAME (Optional):
S3 Bucket Name to to store Faction files. - FACTION_TIER (Required):
Only use the value team here - FACTION_USERS (Required):
The user limit. you can set this to any value that makes sense for your organization.
Email Settings
These settings (FACTION_SMTP_SERVER, FACTION_SMTP_USER< FACTION_SMTP_PORT) are just used for the initial setup of Faction. They will be overridden when you save or test emails in the admin settings pages. This is useful for doing deployments in Kubernetes or ECS.