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:
|
volumes:
|
||||||
- ./scripts:/scripts
|
- ./scripts:/scripts
|
||||||
- ./logs:/var/log
|
- ./logs:/var/log
|
||||||
|
- ./crontabs:/etc/cron.d:ro
|
||||||
environment:
|
environment:
|
||||||
TZ: Europe/Rome
|
TZ: Europe/Rome
|
||||||
CRONTAB: >
|
|
||||||
*/5 7-22 * * * /scripts/test.py
|
|
||||||
*/10 7-22 * * * /scripts/test2.py
|
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mkdir scripts logs
|
mkdir scripts logs crontabs
|
||||||
touch scripts/test.py && chmod +x scripts/test.py
|
touch scripts/test.py && chmod +x scripts/test.py
|
||||||
touch scripts/test2.py && chmod +x scripts/test2.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
|
docker-compose up -d
|
||||||
```
|
```
|
||||||
|
@ -1,12 +1,18 @@
|
|||||||
FROM alpine:3.16
|
FROM debian:bullseye-slim
|
||||||
|
|
||||||
COPY logrotate-cron /etc/logrotate.d
|
COPY logrotate-cron /etc/logrotate.d
|
||||||
COPY entrypoint.sh /
|
COPY entrypoint.sh /
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
mkdir /scripts /crontabs && \
|
mkdir /scripts /crontabs && \
|
||||||
apk -U add python3 py3-pip py3-requests py3-dateutil py3-beautifulsoup4 logrotate tzdata && \
|
apt update && \
|
||||||
pip3 install fdb mysql-connector-python==8.0.29 telepot caldav
|
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 CRONTAB=""
|
||||||
ENV TZ="Europe/Rome"
|
ENV TZ="Europe/Rome"
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ ! -z "${CRONTAB}" ] ; then
|
/usr/sbin/cron -f -L /var/log/cron.log
|
||||||
echo "${CRONTAB}" > /crontabs/roota
|
|
||||||
fi
|
|
||||||
|
|
||||||
/usr/sbin/crond -f -d8 -L /var/log/cron.log -c /crontabs
|
|
||||||
|
Loading…
Reference in New Issue
Block a user