Skip to content
This repository has been archived by the owner on Mar 30, 2020. It is now read-only.

Updated for version 0.03.3 + support for mail notifications #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine:3.8

ARG LUFI_VERSION=0.02.2
ARG LUFI_VERSION=0.03.3

ENV GID=991 \
UID=991 \
Expand All @@ -12,7 +12,11 @@ ENV GID=991 \
MAX_DELAY=0 \
THEME=default \
ALLOW_PWD_ON_FILES=1 \
POLICY_WHEN_FULL=warn
[email protected] \
POLICY_WHEN_FULL=warn \
MAIL_HOW=smtp \
MAIL_HOWARGS=smtp \
[email protected]

LABEL description="lufi based on alpine" \
tags="latest" \
Expand All @@ -28,6 +32,7 @@ RUN BUILD_DEPS="build-base \
perl-dev \
libidn-dev \
postgresql-dev \
mariadb-dev \
wget" \
&& apk add --no-cache ${BUILD_DEPS} \
libressl \
Expand All @@ -39,6 +44,7 @@ RUN BUILD_DEPS="build-base \
tini \
su-exec \
postgresql-libs \
mariadb-dev \
&& echo | cpan \
&& cpan install Carton \
&& git clone https://git.framasoft.org/luc/lufi.git /usr/lufi \
Expand All @@ -48,7 +54,7 @@ RUN BUILD_DEPS="build-base \
&& rm -rf cpanfile.snapshot \
&& carton install \
&& apk del --no-cache ${BUILD_DEPS} \
&& rm -rf /var/cache/apk/* /root/.cpan* /usr/lufi/local/cache/* /usr/lufi/utilities
&& rm -rf /var/cache/apk/* /root/.cpan* /usr/lufi/local/cache/*

VOLUME /usr/lufi/files /usr/lufi/data

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ docker build -t xataz/lufi github.com/xataz/dockerfiles.git#master:lufi
* MAX_DELAY : number of days after which the images will be deleted (default : 0 for unlimited)
* THEME : theme for lufi (default : default)
* ALLOW_PWD_ON_FILES : Enable download password (default : 1 (0 => disable, 1 => enable))
* REPORT : recipient for the report file feature (default : [email protected])
* MAIL_HOW : valid values are 'sendmail' and 'smtp' (default : smtp)
* MAIL_HOWARGS : if smtp, smtp host (default : smtp)

Tips : you can use the following command to generate SECRET. `date +%s | md5sum | head -c 32`

Expand Down
7 changes: 7 additions & 0 deletions lufi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,11 @@
upload_dir => '/usr/lufi/files',
allow_pwd_on_files => <allow_pwd_on_files>,
policy_when_full => '<policy_when_full>',
mail => {
# Valid values are 'sendmail' and 'smtp'
how => '<mail_how>',
howargs => ['<mail_howargs>']
},
mail_sender => '<mail_sender>',
report => '<report>',
};
4 changes: 4 additions & 0 deletions startup
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ sed -i -e 's|<secret>|'${SECRET}'|' \
-e 's|<max_delay>|'${MAX_DELAY}'|' \
-e 's|<theme>|'${THEME}'|' \
-e 's|<allow_pwd_on_files>|'${ALLOW_PWD_ON_FILES}'|' \
-e 's|<mail_sender>|'${MAIL_SENDER}'|' \
-e 's|<mail_how>|'${MAIL_HOW}'|' \
-e 's|<mail_howargs>|'${MAIL_HOWARGS}'|' \
-e 's|<report>|'${REPORT}'|' \
-e 's|<policy_when_full>|'${POLICY_WHEN_FULL}'|' /usr/lufi/lufi.conf

if [ -e /themes ]; then
Expand Down