Slow Start
If you want to tweak the installation of Bmore Responsive or have a different environment, then this page will provide additional detail on how to install/configure Bmore Responsive.
Configuring via Environment variables
Regardless of where you are running the system, environment variables to run this application. These variables are set in the .env
file on the root directory of Bmore Responsive.
Environment Variables
NODE_ENV
: The label for your environment. It can be anything you want and will allow you to differentiate multiple instances. Default:development
.PORT
: The local port you wish to run on. Default:3001
.DATABASE_HOST
: The database host PostgreSQL is running on, which can be specified as a (sub)domain or IP address. Default:db
(fordocker-compose
Postgres instance).DATABASE_PORT
: The database port PostgreSQL is running on. Default:5432
.DATABASE_NAME
: The name of the PostgreSQL database to connect to. Default:postgres
.DATABASE_SCHEMA
: Your local database schema. Default:public
.DATABASE_USERNAME
: The username for connecting to PostgreSQL. Default:postgres
.DATABASE_PASSWORD
: The password for connecting to PostgreSQL.JWT_KEY
: A secret value to generate JSON Web Tokens (JWTs) locally.SMTP_HOST
: optional Hostname for the SMTP server used to send notification emailsSMTP_PORT
: optional Port number for the SMTP server used to send notification emailsSMTP_USER
: optional Username for the SMTP server used to send notification emailsSMTP_PASSWORD
: optional Password for the SMTP server used to send notification emailsBYPASS_LOGIN
: optional Allows you to hit the endpoints locally without having to login. If you wish to bypass the login process during local dev, set this totrue
. Default:true
. Note: at the moment, login will be bypassed if this variable simply exists in the.env
file. EvenBYPASS_LOGIN = false
will remove the need to login. To require login, simply remove mention of this variable from this file.
We do not recommend using the default options for PostgreSQL. The above values are provided as examples. It is more secure to create your own credentials.
Deploying to AWS
If you want to deploy to AWS, we have included a terraform
option. For more information on how to use this feature, please see the README in /terraform
.
SMTP
To send emails with the system you will need to setup your SMTP sever and set the relevant SMTP_*
variables. For testing we recommend using Ethereal
Running in Docker
You can build and run the application in Docker locally by running the following commands:
docker-compose up -d
docker-compose
To use the docker-compose.yml
file included you will first need to set environment variables. It is not recommended to use docker-compose
for any reason other than to test a solution for a separate front-end component.
Running within Gitpod
You can build and run the application utilizing Gitpod if desired. You must have a Gitpod account, you can sign up for one here if desired: Gitpod. If desired, you can also install a browser extension to make creating your "pods" easier here. Once you have created a Gitpod account and installed the extension, you can simply navigate to the Bmore Responsive Github repository and you will see a Gitpod button located at the top of the repo. Clicking on that button should open a Gitpod instance with a running Postgres Database. Once the pod has started, you will be able to run the commands needed to create and seed the Database and run the application. If you haven't installed the extension, then you can create a workspace by prefixing any GitHub URL with gitpod.io/#. For Bmore that would look like https://gitpod.io/#github.com/CodeForBaltimore/Bmore-Responsive