Runs sentiment analysis on your text data
- x64 CPU
- 16 GB RAM for running local LLM, 2 GB for lightweight version
- 16 GB storage, to handle DB and local LLM
- Docker
Project has 2 modes:
- Standalone - using local LLM
- Lightweight - using third-party OpenAI API compatible LLM provider
Disclaimer: Step #4 may fail, if your Docker Engine has limit for storage. Recommended is 4 GB file storage limit.
- Create
.env.standalonefrom template.env.standalone.template - Fill credentials
- Run the following command to start the project with local LLM:
docker compose --env-file .env.standalone -f standalone.compose.yml up -d --build
- Check if LLM is running:
Or
docker compose --env-file .env.standalone -f standalone.compose.yml logs -f ollama
docker logs -f sentiment-ollama
- Create
.env.lightfrom template.env.light.template - Fill credentials
- To run lightweight version, using third-party LLM via any OpenAI API compatible provider, run:
docker compose --env-file .env.light -f light.compose.yml up -d --build
curl -X POST http://localhost:8080/api/sentiment \
-H "Content-Type: application/json" \
-d '{"text": "Этот сервис просто потрясающий, все работает быстро!"}'docker compose compose --env-file .env.standalone -f standalone.compose.yml downThe project includes interactive API documentation powered by Swagger (OpenAPI). The documentation is automatically generated every time the PHP container starts.
Once the containers are running, open the following URL in your browser: 👉 http://localhost:80/api/documentation Manual Generation If you modify API controllers or Swagger annotations and want to update the documentation immediately without restarting the container, run:
docker compose --env-file .env.standalone -f standalone.compose.yml exec php artisan l5-swagger:generate



