ms-assets is a Vapor 3 based microservice to hold all assets information of your application using Minio, so you can select your storage provider
- Upload file using PreSignedURL WorkFlow
- Go to the root folder and run the next command
$ vapor build
- Create a database PostgreSQL we are using docker for this
$ docker run --name postgres -e POSTGRES_DB=assets -p 5432:5432 -e POSTGRES_PASSWORD=123456 -d postgres
- Create a minio instance
// We recommend to generate your own keys
$ docker run -p 9000:9000 --rm --name minio1 \
-e MINIO_ACCESS_KEY="36J9X8EZI4KEV1G7EHXA" \
-e MINIO_SECRET_KEY="ECk2uqOoNqvtJIMQ3WYugvmNPL_-zm3WcRqP5vUM" \
-v ~/Documents/minion-data/data:/data \
-v ~/Documents/minion-data/config:/root/.minio \
minio/minio server --config-dir /root/.minio /data
- Duplicate the .env.TEMPLATE to .env and set your values
$ cp .env.TEMPLATE .env
- Go to the root folder and run the next command
$ vapor run
The documentation for this microservice its written using Swagger
- Create a database PostgreSQL we are using docker for this
$ docker run --rm -p 8081:8080 swagger API/swagger-ui
- With the application running you can use
http://localhost:8080/docs/swagger.yml
in the swagger input to get the docs
- Get the documentation in
http://localhost:8080/docs/swagger.yml
- Paste documentation into
https://app.swaggerhub.com
We recommend run tests with xcode
Note: In order to test works correctly you must have the minio and database configured