Welcome to the Redstore microservice based, a simple implementation with docker containers
git clone https://github.com/MuriloChianfa/Redstore-Microservice-Based.git
cd Redstore-Microservice-Based
cp .env.example .env && vi .env
Scripts/gen-ssl.sh
docker-compose build && docker-compose up -d
docker container exec -u 0 redstore-api composer install && \
docker container exec -u 0 redstore-web composer install
To setup the PROD environment use -f docker-compose.production.yml in two commands
$ docker container exec -it redstore-database mysql -u root -p"simple-server" -D "redstore"
Base URL: https://REDSTORE_IP/api
- GET /products
- GET /products/{page}/{limit}
- GET /products/{page}/{limit}/{order}/{direction}
- GET /product/{id}
- POST /product
- POST /product-image/{id}
- PATCH /product
- DELETE /product-image/{id}
Getting data with Curl
$ curl -ks -X GET https://REDSTORE_IP/api/product/1 | jq .
Output
{
"message": {
"id": 1,
"name": "example product",
"value": 20,
"description": "example product",
"available": 1,
"rate": 0,
"collection_id": null,
"category": {
"id": 8,
"name": "Others"
},
"ProductImage": []
}
}
Add and exclude new products and there images