mirror of
https://git.cloudron.io/cloudron/mastodon-app.git
synced 2024-11-22 07:41:00 +00:00
Add cached media cleanup cron job
This commit is contained in:
parent
343889821f
commit
34fb84e4ef
3 changed files with 16 additions and 2 deletions
|
@ -14,7 +14,13 @@
|
||||||
"postgresql": {},
|
"postgresql": {},
|
||||||
"redis": {},
|
"redis": {},
|
||||||
"sendmail": {},
|
"sendmail": {},
|
||||||
"ldap": {}
|
"ldap": {},
|
||||||
|
"scheduler": {
|
||||||
|
"cleanup": {
|
||||||
|
"schedule": "11 11 * * *",
|
||||||
|
"command": "/app/pkg/cleanup.sh"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"minBoxVersion": "4.1.4",
|
"minBoxVersion": "4.1.4",
|
||||||
"manifestVersion": 2,
|
"manifestVersion": 2,
|
||||||
|
|
|
@ -41,7 +41,7 @@ RUN ln -fs /run/mastodon/bullet.log /app/code/log/bullet.log
|
||||||
RUN ln -fs /app/data/system /app/code/public/system
|
RUN ln -fs /app/data/system /app/code/public/system
|
||||||
RUN rm -rf /app/code/tmp && ln -fs /tmp/mastodon /app/code/tmp
|
RUN rm -rf /app/code/tmp && ln -fs /tmp/mastodon /app/code/tmp
|
||||||
|
|
||||||
COPY start.sh env.template /app/pkg/
|
COPY start.sh cleanup.sh env.template /app/pkg/
|
||||||
|
|
||||||
CMD [ "/app/pkg/start.sh" ]
|
CMD [ "/app/pkg/start.sh" ]
|
||||||
|
|
||||||
|
|
8
cleanup.sh
Executable file
8
cleanup.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
echo "=> Cleanup cached media"
|
||||||
|
|
||||||
|
cd /app/code
|
||||||
|
./bin/tootctl media remove
|
Loading…
Reference in a new issue