Koios (Coeus) was a Titan god of intelligence and farsight, meaning that, due to his inquisitive mind and desire to learn, he was with gained knowledge and understanding able to see beyond the obvious. He was also identified as a god of wisdom and heavenly oracles.
Following the guidelines of the Twelve Factor App (https://12factor.net/), environment variables are kept in a dotenv file at the root directory. When using Docker, the environment (such as the API_SECRET) is configured in the Docker Compose file. Note that the final image size of the Docker image is only 8.52MB in size thanks to a multi-staged build and UPX stripping.
docker build -t koios .
docker tag koios:latest koios:staging
docker-compose up
curl -H "Authorization: Bearer API_SECRET" "http://localhost:1323/api/rate?user=u1&item=i1&rating=0.88"
- /api/rate?user=[uid]&item=[itemid]&rating=[amount]
- /api/recommend?user=[uid]
- /api/update
The code was based on: