This project uses Docker to deploy.
There is a production ready Dockerfile
on the project's root.
You just have to build the Docker image to deploy/run the API.
The API is set to use a PostgreSQL database only.
We are using the environment to configure the API.
You can find a .env.example
at the project's root. The values defined are placeholders used for example purpose.
For a production deployments, these values must be set in the production environment.
The API documentation is accessible via an embedded Swagger.
It can be accessed via [api_url]/swagger
.
Every routes are described there.
The default port of the API is 5000
, but this value can be changed in the env
.
For development purpose only, we are using Docker compose.
Everything is embedded in the docker-compose (database, API, Adminer).
To run the docker compose, use docker-compose up --build
. We are using hot reload, so you don't have to restart the compose on each change.
The default port for Adminer is 8080
.
The credentials for Adminer can be set in the env but the server will always be db
.
To use the default values of the env, copy/paste the .env.example
to a .env
file, on the project's root.
When you add a new entity
to the project, you must use yarn migrate
to generate a migration.
This project is based on service pattern, following NestJS example.