# telemovris ## Installation First build the image with `docker-compose build`. Set up environment variables in `.env` file, get them from https://my.telegram.org/apps. Copy `.env.example` and modify it. Once built, run once: `docker run -it --env-file .env -v $PWD/data:/data telemovris python3 /app/telemovris.py`, it will ask for your phone number (use country code, like `+34666123456`), enter it and follow instructions. When finished, quit with `CTRL+c`. You should now see `telemovris.session` and `telemovris.session-journal` files under `data` folder. You're now all set up. ## Run Execute `docker-compose up -d` The app will query the `REQUEST_URL` variable you set in `.env` file every 5 minutes and load the returned json that should contain the variables `user`, `message` and `audio`, being the user variable the Telegram username (without @), the message the text you want to send to the user, and audio 0 or 1, depending if you want to just send the text or the text and the audio through a call. The `docker-compose.yml` includes a database service (with adminer so you can manage it) and a web service, the web exposes the next call in the `/getmessage` path (the entry will be marked as done in the database when queried) that returns the json of the next call. It also exposes `/sendmessage`, expecting HTTP GET parameters `user`, `message` and `audio`, this will insert a row in the database that will then be queried by the other path. This three services are not needed for the app to work but are meant to be an example on how to use it.