Skip to content
Snippets Groups Projects
Verified Commit 07203d70 authored by Quentin Duchemin's avatar Quentin Duchemin
Browse files

[Lufi] Bump to 0.05.2 and improve Compose, inject env at startup

parent 28696c7e
No related branches found
No related tags found
No related merge requests found
FROM debian:buster
FROM debian:buster-slim
ARG LUFI_BUILD_VERSION=0.04.6
ARG LUFI_BUILD_VERSION=0.05.2
ARG APP_HOME=/lufi
RUN apt-get update \
&& apt-get -yq install build-essential libssl-dev libio-socket-ssl-perl liblwp-protocol-https-perl libpq-dev wget unzip \
&& apt-get clean && cpan Carton \
&& wget https://github.com/ldidry/lufi/archive/${LUFI_BUILD_VERSION}.zip && unzip ${LUFI_BUILD_VERSION}.zip \
&& rm ${LUFI_BUILD_VERSION}.zip && mv lufi-${LUFI_BUILD_VERSION} lufi
&& apt-get clean
COPY lufi.conf /lufi/lufi.conf
RUN wget https://github.com/ldidry/lufi/archive/${LUFI_BUILD_VERSION}.zip && unzip ${LUFI_BUILD_VERSION}.zip \
&& rm ${LUFI_BUILD_VERSION}.zip && mv lufi-${LUFI_BUILD_VERSION} lufi
WORKDIR /lufi
WORKDIR ${APP_HOME}
RUN carton install --deployment --without=test --without=sqlite --without=mysql
CMD ["carton", "exec", "hypnotoad", "-f", "/lufi/script/lufi"]
COPY picadrop /lufi/themes/picadrop
COPY picadrop ${APP_HOME}/themes/picadrop
......@@ -5,32 +5,39 @@ volumes:
lufi-data:
lufi-files:
networks:
docker_default:
external: true
lufi:
services:
lufi:
image: registry.picasoft.net/lufi:0.04.6
image: registry.picasoft.net/lufi:0.05.2
build: .
container_name: lufi
init: true
depends_on:
- lufidb
ports:
- 8081:8081
links:
- lufidb:lufidb
volumes:
- lufi-data:/lufi/data
- lufi-files:/lufi/files
- ./lufi.conf:/lufi/lufi.conf
networks:
- docker_default
- lufi
labels:
- "traefik.frontend.rule=Host:drop.picasoft.net"
- "traefik.backend=lufi"
- "traefik.port=8081"
- "traefik.enable=true"
traefik.frontend.rule: Host:drop.picasoft.net
traefik.port: 8081
traefik.enable: true
env_file: ./secrets/lufi.secrets
restart: unless-stopped
lufidb:
image: postgres:12
container_name: lufidb
restart: always
env_file:
- lufi.env
env_file: ./secrets/lufi.secrets
volumes:
- lufidb-data:/var/lib/postgresql/data
networks:
- lufi
restart: unless-stopped
......@@ -7,7 +7,7 @@
hypnotoad => {
# array of IP addresses and ports you want to listen to
# you can specify a unix socket too, like 'http+unix://%2Ftmp%2Flufi.sock'
listen => ['http://0.0.0.0:8081'],
listen => ['http://*:8081'],
# if you use Lufi behind a reverse proxy like Nginx, you want to set proxy to 1
# if you use Lufi directly, let it commented
proxy => 1,
......@@ -106,7 +106,7 @@
# Remember that it has to be in a directory writable by Lufi user
# DO NOT CHANGE THIS IF FILES HAVE BEEN ALREADY UPLOADED: THEY WILL NOT BE DOWNLOADABLE ANYMORE
# optional, default is 'files'
#upload_dir => 'files',
upload_dir => '/lufi/files',
# Allow to add a password on files, asked before allowing to download files
# optional, default is 0
......@@ -139,7 +139,7 @@
mail => {
# Valid values are 'sendmail' and 'smtp'
how => 'smtp',
howargs => ['smtp.example.org']
howargs => ['mail.picasoft.net:587', AuthUser => 'drop@picasoft.net', AuthPass => 'example']
},
# Email sender address
......@@ -166,7 +166,7 @@
# These are the credentials to access the PostgreSQL database
# mandatory if you choosed postgresql as dbtype
pgdb => {
database => 'lufidb',
database => 'lufi',
host => 'lufidb',
# optional, default is 5432
port => 5432,
......@@ -314,7 +314,7 @@
# Number of days senders' IP addresses are kept in database
# After that delay, they will be deleted from database (used with script/lufi cron cleanbdd)
# optional, default is 365
keep_ip_during => 365,
keep_ip_during => 14,
# Max size of the files directory, in octets
# Used by script/lufi cron watch to trigger an action
......@@ -330,5 +330,5 @@
# Files which are not viewed since delete_no_longer_viewed_files days will be deleted by the cron cleanfiles task
# If delete_no_longer_viewed_files is not set, the no longer viewed files will NOT be deleted
# optional, no default
#delete_no_longer_viewed_files => 90,
delete_no_longer_viewed_files => 365,
};
POSTGRES_PASSWORD=passwd
POSTGRES_USER=lufidb
POSTGRES_PASSWORD=passwd
POSTGRES_DB=lufi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment