added bitwarden and migrated to debian
This commit is contained in:
parent
6a63e9cd88
commit
a569e48273
10
README.md
10
README.md
@ -16,16 +16,18 @@ services:
|
||||
volumes:
|
||||
- ./scripts:/scripts
|
||||
- ./logs:/var/log
|
||||
- ./crontabs:/etc/cron.d:ro
|
||||
environment:
|
||||
TZ: Europe/Rome
|
||||
CRONTAB: >
|
||||
*/5 7-22 * * * /scripts/test.py
|
||||
*/10 7-22 * * * /scripts/test2.py
|
||||
```
|
||||
|
||||
```bash
|
||||
mkdir scripts logs
|
||||
mkdir scripts logs crontabs
|
||||
touch scripts/test.py && chmod +x scripts/test.py
|
||||
touch scripts/test2.py && chmod +x scripts/test2.py
|
||||
cat <<EOF >crontabs/myscripts
|
||||
*/5 7-22 * * * /scripts/test.py
|
||||
*/10 7-22 * * * /scripts/test2.py
|
||||
EOF
|
||||
docker-compose up -d
|
||||
```
|
||||
|
@ -1,12 +1,18 @@
|
||||
FROM alpine:3.16
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
COPY logrotate-cron /etc/logrotate.d
|
||||
COPY entrypoint.sh /
|
||||
|
||||
RUN \
|
||||
mkdir /scripts /crontabs && \
|
||||
apk -U add python3 py3-pip py3-requests py3-dateutil py3-beautifulsoup4 logrotate tzdata && \
|
||||
pip3 install fdb mysql-connector-python==8.0.29 telepot caldav
|
||||
apt update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt -y upgrade && \
|
||||
DEBIAN_FRONTEND=noninteractive apt -y install wget python3 python3-pip python3-dateutil python3-requests python3-bs4 logrotate unzip tzdata && \
|
||||
pip3 install fdb mysql-connector-python==8.0.29 telepot caldav && \
|
||||
wget -O /tmp/bw.zip 'https://vault.bitwarden.com/download/?app=cli&platform=linux' && \
|
||||
unzip /tmp/bw.zip -d /usr/local/bin && \
|
||||
chmod +x /usr/local/bin/bw && \
|
||||
rm /tmp/bw.zip
|
||||
|
||||
ENV CRONTAB=""
|
||||
ENV TZ="Europe/Rome"
|
||||
|
@ -1,7 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ ! -z "${CRONTAB}" ] ; then
|
||||
echo "${CRONTAB}" > /crontabs/roota
|
||||
fi
|
||||
|
||||
/usr/sbin/crond -f -d8 -L /var/log/cron.log -c /crontabs
|
||||
/usr/sbin/cron -f -L /var/log/cron.log
|
||||
|
Loading…
Reference in New Issue
Block a user