This Readme deals with how to run all services simultaneously using docker-compose
. For more information on individual services, see their respective subfolders.
Clone the repository
git clone https://github.com/global-121/121-platform.git
Switch to the repository folder
cd services/
Copy the centralized .env file
cp .env.example .env
Environment variables are explained in the comments of the .env.example, they should be set up prior to development
Run (from /services
folder):
docker-compose up -d --build
Run (from /services
folder):
docker-compose -f docker-compose.yml -f docker-compose.development.yml up -d --build
To follow the logs of the respective services run:
docker-compose logs --follow 121-service PA-accounts-service
Or other relevant commands (see README's in their subfolders).
If you want your IDE to (re-)use the (dev-)dependencies and tools installed in the container, you can copy them via a command from the root: (where <service>
is one of all
, 121-service
, PA-accounts-service
)
npm run sync-dev-dependencies:<service>
This is a one-time copy, so when there are updates in the container, you have to run the command again.
We use the NestJS Swagger module for API documentation. NestJS Swagger.
- Access the
121-service
Swagger-UI via: http://localhost:3000/docs/ - Access the
PA-accounts-service
Swagger-UI via: http://localhost:3001/docs/
All services use JSON Web Token (JWT) to handle authentication. The token should be passed with each request using the Authorization
header with Token
scheme. The JWT authentication middleware handles the validation and authentication of the token.
All the tokens and access keys for third party APIs should be added on the .env file and subsequently imported using the environment variables within typescript files.