- Sure you have installed docker & docker-compose on your linux machine
- Clone this repository and execute
docker-compose up -d
in the project root
HTTP server would be running on http://localhost:8080/ (change port in docker-compose.yml if needed)
Look at file config/services.yaml
to change storage format:
# Chose data format by swapping DataFormatter implementation below
App\Storage\Question\DataFormatterInterface:
#class: App\Storage\Question\JsonDataFormatter
class: App\Storage\Question\CsvDataFormatter
Now it is only one adapter GoogleTranslatorAdapter
which uses stichoza/google-translate-php library but you can add your own implementation and load it by changing:
App\Service\Translator\AdapterInterface:
class: App\Service\Translator\Adapter\GoogleTranslatorAdapter
You can choose a directory for storage by .env variable:
DATA_PATH=var/data/questions
To explore API documentation you could copy open-api.yaml content to https://editor.swagger.io/