This commit is contained in:
Lynne 2018-11-27 21:29:02 +10:00
commit 978308736a
No known key found for this signature in database
GPG key ID: FB7B970303ACE499
2 changed files with 26 additions and 2 deletions

24
Dockerfile Normal file
View file

@ -0,0 +1,24 @@
FROM python:3-alpine
ADD requirements.txt /ebooks/
WORKDIR /ebooks/
VOLUME /ebooks/data/
RUN apk add --virtual .build-deps gcc musl-dev libffi-dev openssl-dev \
&& pip install -r requirements.txt \
&& apk del --purge .build-deps \
&& ln -s data/config.json . \
&& ln -s data/toots.db .
ADD *.py /ebooks/
RUN (echo "*/30 * * * * cd /ebooks/ && python gen.py"; \
echo "5 */2 * * * cd /ebooks/ && python main.py"; \
echo "@reboot cd /ebooks/ && python reply.py") | crontab -
ENV ebooks_site=https://botsin.space
CMD (test -f data/config.json || echo "{\"site\":\"${ebooks_site}\"}" > data/config.json) \
&& (test -f data/toots.db || (python main.py && exit)) \
&& exec crond -f -L /dev/stdout

View file

@ -8,14 +8,14 @@ This version makes quite a few changes from [the original](https://github.com/Je
- Doesn't unecessarily redownload all toots every time
## Install/usage guide
An installation and usage guide is available for unix-based platforms (linux, macOS...) [here](https://cloud.lynnesbian.space/s/Qxxm2sYdMZaqWat).
An installation and usage guide is available [here](https://cloud.lynnesbian.space/s/jozbRi69t4TpD95). It's primarily targeted at Linux, but it should be possible on BSD, macOS, etc. I've also put some effort into providing steps for Windows, but I can't make any guarantees as to its effectiveness.
## Original README
hey look it's an ebooks bot
python3
install the requirements with `sudo pip3 install -r requirements`
install the requirements with `sudo pip3 install -r requirements.txt`
make a bot (probably on bots in space) and follow the target accounts