diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5523668 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM python:3.6-alpine + +WORKDIR /usr/src +# Install requirements +RUN apk add --no-cache gcc musl-dev libffi-dev openssl-dev +# Copy files to container +COPY . /usr/src/addarr +# Install ans build Addarr requirements, make symlink to redirect logs to stdout +RUN cd addarr && \ + pip install --no-cache-dir -r requirements.txt --upgrade && \ + ln -s /dev/stdout /usr/src/telegramBot.log + +ENTRYPOINT ["python"] +CMD ["/usr/src/addarr/addarr.py"] diff --git a/README.md b/README.md index 0791823..8ad665a 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,22 @@ # ADDARR -This is a TelegramBot made to add series to [Sonarr](https://github.com/Sonarr/Sonarr) or movies to [Radarr](https://github.com/Radarr/Radarr with a couple of commands. +This is a TelegramBot made to add series to [Sonarr](https://github.com/Sonarr/Sonarr) or movies to [Radarr](https://github.com/Radarr/Radarr) with a couple of commands. -### HOW IT WORKS -You can start the bot with sending a message or command 'start' +## HOW IT WORKS +You can start the bot with sending a message or command `/start`. +The rest will be made clear by the bot. -The rest will be made clear by the bot - -### SCREENSHOTS +## SCREENSHOTS
-### INSTALLATION +## INSTALLATION +### FreeBSD For the moment I only made a wikipage for [installation on FreeBSD](https://github.com/Waterboy1602/Addarr/wiki/Installation-on-FreeBSD). If there is interest for other wikipages, just tell me and I will look for it. +### Docker +* To build a docker image use the command `docker-compose build`. +* After that copy the provided `config_example.yaml` to `config.yaml` and set the values to your configuration. +* Then you can use the provided docker-compose file to run the bot using the command `docker-compose up -d`. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..e214f34 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +version: '3' +services: + addarr: + container_name: addarr_bot + build: . + restart: unless-stopped + network_mode: host + volumes: + - ./config.yaml:/usr/src/addarr/config.yaml:ro