Env vars will be loaded from the .env file if present. Env vars loaded from the .env file will never overwite existing variables.
ENV set this to production when deploying.
DB_HOST this is the IP address of the PostgreSQL database.
DB_USER this is the username used to connect to PostgreSQL.
DB_PASS this is the password used to connect to PostgreSQL.
REDIS_HOST this is the IP address of the Redis server.
Run with Docker
The server can be run in a Docker container. The container will need access to a Redis and Postgres server, the addresses can be set by using a .env file and passing it to the docker run command.
Build image - docker build -t server .
Run container - docker run -itd --env-file .env --restart always --name server -p 3000:3000 server
Command Line Arguments
-e - this will prevent the .env file from being loaded.