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