Skip to content

Commit 3aa56ec

Browse files
committed
feat: update lufi
1 parent 556f5c4 commit 3aa56ec

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

stacks/lufi.yml

+21-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
# DOMAIN=example.com docker stack deploy -c lufi.yml lufi
22

33
x-defaults: &defaults
4-
image: ethibox/lufi:${VERSION:-0.05.18}
4+
image: ethibox/lufi:${VERSION:-0.07.0}
55
volumes:
66
- ${VOLUME_PATH}data:/usr/lufi/data
77
- ${VOLUME_PATH}files:/usr/lufi/files
88
environment:
99
- CONTACT=${CONTACT:[email protected]}
1010
- DEFAULT_DELAY=${DEFAULT_DELAY:-1}
11-
- MAX_DELAY=${MAX_DELAY:-0}
12-
- MAX_FILE_SIZE=${MAX_FILE_SIZE:-10000000000}
11+
- MAX_DELAY=${MAX_DELAY:-30}
12+
- MAX_FILE_SIZE=${MAX_FILE_SIZE:-2147483648}
13+
- MAX_TOTAL_SIZE=${MAX_TOTAL_SIZE:-50}
14+
- POLICY_WHEN_FULL=${POLICY_WHEN_FULL:-warn}
1315
- SECRET=${SECRET:-mys3cr3t}
1416

1517
services:
@@ -23,26 +25,35 @@ services:
2325
- traefik.http.routers.lufi-${NUMBER:-1}.service=lufi-${NUMBER:-1}
2426
- traefik.http.routers.lufi-${NUMBER:-1}.tls.certresolver=letsencrypt
2527
- traefik.http.services.lufi-${NUMBER:-1}.loadbalancer.server.port=8081
28+
networks:
29+
- traefik
30+
- internal
2631

2732
cron:
2833
<<: *defaults
2934
healthcheck:
3035
disable: true
36+
entrypoint: /bin/sh
3137
command:
32-
- /bin/sh
3338
- -c
3439
- |
35-
while true; do
36-
carton exec script/lufi cron cleanfiles --mode production
37-
carton exec script/lufi cron cleanbdd --mode production
38-
sleep 3600
39-
done
40+
apt update && apt install -y cron
41+
( crontab -l 2>/dev/null;
42+
echo '0 * * * * cd /usr/lufi && /usr/local/bin/carton exec script/lufi cron cleanfiles --mode production >> /proc/1/fd/1 2>&1';
43+
echo '0 * * * * cd /usr/lufi && /usr/local/bin/carton exec script/lufi cron cleanbdd --mode production >> /proc/1/fd/1 2>&1';
44+
echo '0 * * * * cd /usr/lufi && /usr/local/bin/carton exec script/lufi cron watch --mode production >> /proc/1/fd/1 2>&1' ) | crontab -
45+
docker-entrypoint.sh cron -f
46+
networks:
47+
- internal
4048

4149
volumes:
4250
data:
4351
files:
4452

4553
networks:
46-
default:
54+
internal:
55+
driver: overlay
56+
attachable: true
57+
traefik:
4758
external: true
4859
name: traefik-net

0 commit comments

Comments
 (0)