mirror of
https://github.com/ledgersmb/ledgersmb-docker.git
synced 2025-10-14 16:20:29 -04:00
Compare commits
23 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
34937fbd4f | ||
|
c6968b5397 | ||
|
5168936493 | ||
|
49a448c732 | ||
|
27b3e40e72 | ||
|
6593d58698 | ||
|
5a7ec0a2ed | ||
|
236a25b767 | ||
|
943fa166e8 | ||
|
a678ae39a0 | ||
|
3d12e4351d | ||
|
ccd90f04a4 | ||
|
4d316f9019 | ||
|
71f876a253 | ||
|
ab00872e02 | ||
|
483a1110ff | ||
|
a2a625d193 | ||
|
f10924cae9 | ||
|
c13d20651c | ||
|
7771b8c03b | ||
|
1ba89cef50 | ||
|
d7ad535199 | ||
|
ac2553ea17 |
92
Dockerfile
92
Dockerfile
@@ -1,9 +1,52 @@
|
||||
FROM debian:buster-slim
|
||||
MAINTAINER Freelock john@freelock.com
|
||||
|
||||
# Build time variables
|
||||
ARG LSMB_VERSION="1.8.17"
|
||||
|
||||
ARG SRCIMAGE=debian:bullseye-slim
|
||||
|
||||
|
||||
FROM $SRCIMAGE AS builder
|
||||
|
||||
ARG LSMB_VERSION="1.9.1"
|
||||
ARG LSMB_DL_DIR="Releases"
|
||||
ARG ARTIFACT_LOCATION="https://download.ledgersmb.org/f/$LSMB_DL_DIR/$LSMB_VERSION/ledgersmb-$LSMB_VERSION.tar.gz"
|
||||
|
||||
|
||||
RUN set -x ; \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -y update && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -y upgrade && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -y install dh-make-perl libmodule-cpanfile-perl git wget && \
|
||||
apt-file update
|
||||
|
||||
RUN set -x ; \
|
||||
wget --quiet -O /tmp/ledgersmb-$LSMB_VERSION.tar.gz "$ARTIFACT_LOCATION" && \
|
||||
tar -xzf /tmp/ledgersmb-$LSMB_VERSION.tar.gz --directory /srv && \
|
||||
rm -f /tmp/ledgersmb-$LSMB_VERSION.tar.gz && \
|
||||
cd /srv/ledgersmb && \
|
||||
( ( for lib in $( cpanfile-dump --with-all-features --recommends --no-configure --no-build --no-test ) ; \
|
||||
do \
|
||||
if dh-make-perl locate "$lib" 2>/dev/null ; \
|
||||
then \
|
||||
: \
|
||||
else \
|
||||
echo no : $lib ; \
|
||||
fi ; \
|
||||
done ) | grep -v dh-make-perl | grep -v 'not found' | grep -vi 'is in Perl ' | cut -d' ' -f4 | sort | uniq | tee /srv/derived-deps ) && \
|
||||
cat /srv/derived-deps
|
||||
|
||||
|
||||
#
|
||||
#
|
||||
# The real image build starts here
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
FROM $SRCIMAGE
|
||||
LABEL org.opencontainers.image.authors="LedgerSMB project <devel@lists.ledgersmb.org>"
|
||||
|
||||
ARG LSMB_VERSION="1.9.1"
|
||||
ARG LSMB_DL_DIR="Releases"
|
||||
ARG ARTIFACT_LOCATION="https://download.ledgersmb.org/f/$LSMB_DL_DIR/$LSMB_VERSION/ledgersmb-$LSMB_VERSION.tar.gz"
|
||||
|
||||
|
||||
# Install Perl, Tex, Starman, psql client, and all dependencies
|
||||
# Without libclass-c3-xs-perl, performance is terribly slow...
|
||||
@@ -13,7 +56,11 @@ ARG LSMB_DL_DIR="Releases"
|
||||
# Install Locale::Codes Locale::Country Locale::Language from CPAN to suppress
|
||||
# deprecation-as-core-module warning
|
||||
|
||||
RUN echo -n "APT::Install-Recommends \"0\";\nAPT::Install-Suggests \"0\";\n" >> /etc/apt/apt.conf && \
|
||||
|
||||
COPY --from=builder /srv/derived-deps /tmp/derived-deps
|
||||
|
||||
RUN set -x ; \
|
||||
echo -n "APT::Install-Recommends \"0\";\nAPT::Install-Suggests \"0\";\n" >> /etc/apt/apt.conf && \
|
||||
mkdir -p /usr/share/man/man1/ && \
|
||||
mkdir -p /usr/share/man/man2/ && \
|
||||
mkdir -p /usr/share/man/man3/ && \
|
||||
@@ -21,38 +68,14 @@ RUN echo -n "APT::Install-Recommends \"0\";\nAPT::Install-Suggests \"0\";\n" >>
|
||||
mkdir -p /usr/share/man/man5/ && \
|
||||
mkdir -p /usr/share/man/man6/ && \
|
||||
mkdir -p /usr/share/man/man7/ && \
|
||||
mkdir -p /usr/share/man/man8/ && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -y update && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -y upgrade && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -y install \
|
||||
wget ca-certificates gnupg \
|
||||
libauthen-sasl-perl libcgi-emulate-psgi-perl libconfig-inifiles-perl \
|
||||
libcookie-baker-perl libdbd-pg-perl libdbi-perl libdata-uuid-perl \
|
||||
libdatetime-perl libdatetime-format-strptime-perl \
|
||||
libemail-sender-perl libemail-stuffer-perl libfile-find-rule-perl \
|
||||
libhtml-escape-perl libhttp-headers-fast-perl libio-stringy-perl \
|
||||
libjson-maybexs-perl libcpanel-json-xs-perl libjson-pp-perl \
|
||||
liblist-moreutils-perl \
|
||||
liblocale-maketext-perl liblocale-maketext-lexicon-perl \
|
||||
liblog-log4perl-perl libmime-types-perl \
|
||||
libmath-bigint-gmp-perl libmodule-runtime-perl libmoo-perl \
|
||||
libmoox-types-mooselike-perl libmoose-perl \
|
||||
libmoosex-nonmoose-perl libnumber-format-perl \
|
||||
libpgobject-perl libpgobject-simple-perl libpgobject-simple-role-perl \
|
||||
libpgobject-type-bigfloat-perl libpgobject-type-datetime-perl \
|
||||
libpgobject-type-bytestring-perl libpgobject-util-dbmethod-perl \
|
||||
libpgobject-util-dbadmin-perl libplack-perl \
|
||||
libplack-builder-conditionals-perl libplack-middleware-reverseproxy-perl \
|
||||
libplack-request-withencoding-perl libscope-guard-perl \
|
||||
libsession-storage-secure-perl libstring-random-perl \
|
||||
libtemplate-perl libtext-csv-perl libtext-csv-xs-perl \
|
||||
libtext-markdown-perl libtry-tiny-perl libversion-compare-perl \
|
||||
libxml-libxml-perl libnamespace-autoclean-perl \
|
||||
starman starlet libhttp-parser-xs-perl \
|
||||
libtemplate-plugin-latex-perl libtex-encode-perl \
|
||||
libxml-twig-perl libopenoffice-oodoc-perl \
|
||||
libexcel-writer-xlsx-perl libspreadsheet-writeexcel-perl \
|
||||
libclass-c3-xs-perl liblocale-codes-perl \
|
||||
texlive-latex-recommended texlive-fonts-recommended \
|
||||
$( cat /tmp/derived-deps ) \
|
||||
libclass-c3-xs-perl \
|
||||
texlive-plain-generic texlive-latex-recommended texlive-fonts-recommended \
|
||||
texlive-xetex fonts-liberation \
|
||||
lsb-release && \
|
||||
echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
|
||||
@@ -60,10 +83,9 @@ RUN echo -n "APT::Install-Recommends \"0\";\nAPT::Install-Suggests \"0\";\n" >>
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -y update && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -y install postgresql-client && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -q -y install git cpanminus make gcc libperl-dev && \
|
||||
wget --quiet -O /tmp/ledgersmb-$LSMB_VERSION.tar.gz "https://download.ledgersmb.org/f/$LSMB_DL_DIR/$LSMB_VERSION/ledgersmb-$LSMB_VERSION.tar.gz" && \
|
||||
wget --quiet -O /tmp/ledgersmb-$LSMB_VERSION.tar.gz "$ARTIFACT_LOCATION" && \
|
||||
tar -xzf /tmp/ledgersmb-$LSMB_VERSION.tar.gz --directory /srv && \
|
||||
rm -f /tmp/ledgersmb-$LSMB_VERSION.tar.gz && \
|
||||
cpanm --reinstall --notest Locale::Country Locale::Codes Locale::Language && \
|
||||
cpanm --notest \
|
||||
--with-feature=starman \
|
||||
--with-feature=latex-pdf-ps \
|
||||
|
34
README.md
34
README.md
@@ -4,7 +4,8 @@ Dockerfile for LedgerSMB Docker image
|
||||
|
||||
# Supported tags
|
||||
|
||||
- `1.8`, `1.8.x`, `latest` - Latest official release from the 1.8 branch
|
||||
- `1.9`, `1.9.x`, `latest` - Latest official release from the 1.9 branch
|
||||
- `1.8`, `1.8.x` - Latest official release from the 1.8 branch
|
||||
- `1.7`, `1.7.x` - Latest official release from 1.7 branch
|
||||
- `1.6`, `1.6.33` - Last official release from 1.6 branch
|
||||
- `1.5`, `1.5.30` - Last official release from 1.5 branch
|
||||
@@ -71,7 +72,7 @@ The database username and password are:
|
||||
```
|
||||
|
||||
From here, follow the steps as detailed in the instructions for
|
||||
[preparing for first use](https://ledgersmb.org/content/preparing-ledgersmb-17-first-use).
|
||||
[preparing for first use](https://ledgersmb.org/content/preparing-ledgersmb-19-first-use).
|
||||
|
||||
## Manual installation
|
||||
|
||||
@@ -148,30 +149,6 @@ affect the performance experience of users.
|
||||
|
||||
## Mail configuration
|
||||
|
||||
### Before 1.8.0
|
||||
|
||||
These variables are used to set outgoing SMTP defaults.
|
||||
|
||||
* `SSMTP_ROOT` (config: `Root` -- DEPRECATED)
|
||||
* `SSMTP_MAILHUB` (config: `Mailhub`)
|
||||
* `SSMTP_HOSTNAME` (config: `Hostname`)
|
||||
* `SSMTP_USE_STARTTLS` (config: `UseSTARTTLS`)
|
||||
* `SSMTP_AUTH_USER` (config: `AuthUser`)
|
||||
* `SSMTP_AUTH_PASS` (config: `AuthPass`)
|
||||
* `SSMTP_AUTH_METHOD` (config: `AuthMethod` -- DEPRECATED)
|
||||
* `SSMTP_FROMLINE_OVERRIDE` (config: `FromLineOverride` -- DEPRECATED)
|
||||
|
||||
`SSMTP_MAILHUB` defaults to the default docker0 interface, so if your host is
|
||||
already configured to relay mail, this should relay successfully with only
|
||||
the root and hostname set.
|
||||
|
||||
Use the other environment variables to relay mail through a different host.
|
||||
Use the [ssmtp.conf man
|
||||
page](https://www.systutorials.com/docs/linux/man/5-ssmtp.conf/) to look up
|
||||
the meaning and function of each of the mail configuration keys.
|
||||
|
||||
### 1.8.0 and higher (under development)
|
||||
|
||||
As of 1.8.0, the image is based on Debian Buster instead of Debian Stretch;
|
||||
with Buster, the `ssmtp` program has been removed from Debian, this image
|
||||
had to change strategy. The main application always came with built-in e-mail
|
||||
@@ -204,9 +181,8 @@ please contact us on the [mailing list](http://ledgersmb.org/topic/support/maili
|
||||
or through a [GitHub issue](https://github.com/ledgersmb/ledgersmb-docker/issues).
|
||||
|
||||
You can also reach some of the official LedgerSMB maintainers via the
|
||||
`#ledgersmb` IRC channel on [Freenode](https://freenode.net), or on the
|
||||
bridged [Matrix](https://matrix.org) room in [#ledgersmb:matrix.org](https://matrix.to/#/#ledgersmb:matrix.org).
|
||||
The [Riot.im](https://riot.im/app/#/room/#ledgersmb:matrix.org) Matrix client is highly recommended.
|
||||
[Matrix](https://matrix.org) room in [#ledgersmb:matrix.org](https://matrix.to/#/#ledgersmb:matrix.org).
|
||||
The [Element](https://app.element.io/#/room/#ledgersmb:matrix.org) Matrix client is highly recommended.
|
||||
|
||||
|
||||
## Contributing
|
||||
|
@@ -16,7 +16,7 @@ services:
|
||||
# because that allows us to use the default hostname ("postgres")
|
||||
# from the LedgerSMB configuration
|
||||
postgres:
|
||||
image: postgres:9.6-alpine
|
||||
image: postgres:12-alpine
|
||||
environment:
|
||||
# Replace the password below for a secure setup
|
||||
POSTGRES_PASSWORD: abc
|
||||
@@ -28,7 +28,7 @@ services:
|
||||
lsmb:
|
||||
depends_on:
|
||||
- postgres
|
||||
image: ledgersmb/ledgersmb:1.8
|
||||
image: ledgersmb/ledgersmb:1.9
|
||||
networks:
|
||||
- internal
|
||||
- default
|
||||
@@ -58,6 +58,15 @@ services:
|
||||
# SSMTP_AUTH_METHOD:
|
||||
# SSMTP_USE_STARTTLS:
|
||||
# SSMTP_FROMLINE_OVERRIDE:
|
||||
#
|
||||
#
|
||||
# The PROXY_IP environment variable lets you set the IP address
|
||||
# (range) of the reverse proxy used for TLS termination, which forwards
|
||||
# its requests to this container. When this reverse proxy runs on the
|
||||
# Docker host, the default below applies. In case the reverse proxy is
|
||||
# hosted in a separate container, this setting needs to be adjusted.
|
||||
#
|
||||
# PROXY_IP: 172.17.0.1/12
|
||||
|
||||
# having the dbdata volume is required to persist our
|
||||
# data between PostgreSQL container updates; without
|
||||
|
4
start.sh
4
start.sh
@@ -85,6 +85,8 @@ ${LSMB_MAIL_SMTPHOST:+smtphost=$LSMB_MAIL_SMTPHOST
|
||||
}${LSMB_MAIL_SMTPPASS:+smtppass=$LSMB_MAIL_SMTPPASS
|
||||
}${LSMB_MAIL_SMTPAUTHMECH:+smtpauthmech=$LSMB_MAIL_SMTPAUTHMECH
|
||||
}
|
||||
[proxy]
|
||||
ip=${PROXY_IP:-172.17.0.1/12}
|
||||
EOF
|
||||
export LSMB_CONFIG_FILE='/tmp/ledgersmb.conf'
|
||||
fi
|
||||
@@ -100,6 +102,6 @@ echo '--------- LEDGERSMB CONFIGURATION --- END'
|
||||
|
||||
# ':5762:' suppresses an uninitialized variable warning in starman
|
||||
# the last colon means "don't connect using tls"; without it, there's a warning
|
||||
exec starman --listen :5762: --max-workers ${LSMB_WORKERS:-5} \
|
||||
exec starman --listen :5762: --workers ${LSMB_WORKERS:-5} \
|
||||
-I lib -I old/lib \
|
||||
--preload-app bin/ledgersmb-server.psgi
|
||||
|
Reference in New Issue
Block a user