The API Gateway for marketplace system.
- Clone the repository:
git clone [email protected]:marketplace-system/shop_api.git
- Rename the file “.env.example” under “/” to “.env” then change the parameters to match your preferences, example:
#RABBITMQ CONNECTION PARAMS
RABBITMQ_HOST=
RABBITMQ_PORT=
RABBITMQ_USER=
RABBITMQ_PASS=
#REDIS CONNECTION PARAMS
REDIS_HOST=
REDIS_PORT=
REDIS_PASSWORD=
...
Note: You can use network (marketplace-network) gateway ip instead of providing each container ip
- Build a new image:
docker-compose build
- Run the containers
docker-compose up -d
If you want to scale up the workers (sync / async), you can simply run this command:
docker-compose up --scale api-interface=num -d
Where “num” is the number of processes to run, example:
docker-compose up --scale api-interface=3 -d
To run the unit test, just run this command:
docker-compose up api-unit-test