Installation
Docker Compose [Recommended]
Step 1 - Download the required files
Create a directory of your choice (e.g. ./waistline-api
) to hold the docker-compose.yml
and .env.local
files.
docker-compose.yml
and .env
by running the following commands:
Step 2 - Populate the .env file with custom values
You should change these values for security reason:
APP_ENV= # Set it to "prod"
APP_SECRET= # You should generate a new app secret
APP_BASE_URL= # The url of the app (without the ending /)
DATABASE_URL= # Your database connection string
MONGODB_URL= # Your mongodb connection string
docker-compose.yml
.
Step 3 - Start the containers
From the directory you created in Step 1, run:
Step 4 - Execute migrations
Once the containers are up and running, you may have to execute these commands to instantiate the database and reset the cache: