add cron
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
uetchy 2022-02-05 12:40:04 +09:00
parent 3becc75947
commit e73e9364cd
5 changed files with 23 additions and 5 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
/data/ /data/
/.vscode /.vscode
/.sass-cache /.sass-cache
/node_modules/ /node_modules/

View File

@ -1,9 +1,10 @@
deploy: build
docker rm -f uechi.io uechi.io-cron
docker-compose -f docker-compose.production.yml up -d
build: build:
docker-compose build --pull docker-compose build --pull
push: push:
docker-compose push docker-compose push
deploy: build
docker rm -f uechi.io
docker-compose -f docker-compose.production.yml up -d

View File

@ -9,7 +9,17 @@ services:
VIRTUAL_HOST: uechi.io VIRTUAL_HOST: uechi.io
LETSENCRYPT_HOST: uechi.io LETSENCRYPT_HOST: uechi.io
volumes: volumes:
- "./data:/var/www/html/★/:ro" - "./data:/var/www/html/_:ro"
labels:
com.centurylinklabs.watchtower.enable: "true"
cron:
image: ghcr.io/uetchy/uechi.io
command: /usr/sbin/crond -d 8 -f
restart: unless-stopped
container_name: uechi.io-cron
volumes:
- "./data:/var/www/html/_"
- "./periodic/daily:/etc/periodic/daily:ro"
labels: labels:
com.centurylinklabs.watchtower.enable: "true" com.centurylinklabs.watchtower.enable: "true"

6
periodic/daily/280blocker Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
echo "Updating 280blocker filter..."
FILTER_PATH="/var/www/html/_/280blocker.txt"
curl -sL "https://280blocker.net/files/280blocker_adblock_$(date +"%Y%m").txt" -o "$FILTER_PATH"