mirror of
https://github.com/ledgersmb/ledgersmb-docker.git
synced 2025-04-19 06:37:11 -04:00
Merge remote-tracking branch 'upstream/master' into enhancement-master_reduce_number_of_layers
Conflicts: Dockerfile
This commit is contained in:
commit
b8694aa449
@ -2,7 +2,7 @@ FROM debian:jessie
|
||||
MAINTAINER Freelock john@freelock.com
|
||||
|
||||
# Install Perl, Tex, Starman, psql client, and all dependencies
|
||||
RUN echo -e "APT::Install-Recommends \"false\";\nAPT::Install-Suggests \"false\";\n" > /etc/apt/apt.conf && \
|
||||
RUN echo -e "APT::Install-Recommends \"false\";\nAPT::Install-Suggests \"false\";\n" > /etc/apt/apt.conf.d/00recommends && \
|
||||
apt-get update DEBIAN_FRONTEND="noninteractive" apt-get -y install && \
|
||||
libcgi-emulate-psgi-perl libcgi-simple-perl libconfig-inifiles-perl \
|
||||
libdbd-pg-perl libdbi-perl libdatetime-perl \
|
||||
@ -95,8 +95,5 @@ RUN mkdir -p /tmp && \
|
||||
|
||||
# Internal Port Expose
|
||||
EXPOSE 5762
|
||||
# If ledgersmb.conf does not exist, www-data user needs to be able to create it.
|
||||
RUN chown www-data /srv/ledgersmb
|
||||
USER www-data
|
||||
|
||||
CMD ["start.sh"]
|
||||
|
23
start.sh
23
start.sh
@ -4,14 +4,20 @@ update_ssmtp.sh
|
||||
cd /srv/ledgersmb
|
||||
|
||||
if [[ ! -f ledgersmb.conf ]]; then
|
||||
cp conf/ledgersmb.conf.default ledgersmb.conf
|
||||
sed -i \
|
||||
-e "s/\(cache_templates = \).*\$/cache_templates = 1/g" \
|
||||
-e "s/\(host = \).*\$/\1$POSTGRES_HOST/g" \
|
||||
-e "s/\(port = \).*\$/\1$POSTGRES_PORT/g" \
|
||||
-e "s/\(default_db = \).*\$/\1$DEFAULT_DB/g" \
|
||||
-e "s%\(sendmail = \).*%\1/usr/sbin/ssmtp%g" \
|
||||
/srv/ledgersmb/ledgersmb.conf
|
||||
cat <<EOF >/tmp/ledgersmb.conf
|
||||
[main]
|
||||
cache_templates = 1
|
||||
|
||||
[database]
|
||||
host = $POSTGRES_HOST
|
||||
port = $POSTGRES_PORT
|
||||
default_db = $DEFAULT_DB
|
||||
|
||||
[mail]
|
||||
sendmail = /usr/sbin/ssmtp
|
||||
|
||||
EOF
|
||||
export LSMB_CONFIG_FILE='/tmp/ledgersmb.conf'
|
||||
fi
|
||||
|
||||
# Currently unmaintained/untested
|
||||
@ -23,6 +29,7 @@ fi
|
||||
|
||||
# Needed for modules loaded by cpanm
|
||||
export PERL5LIB
|
||||
|
||||
for PerlLib in /usr/lib/perl5* /usr/local/lib/perl5*/site_perl/* ; do
|
||||
[[ -d "$PerlLib" ]] && {
|
||||
PERL5LIB="$PerlLib";
|
||||
|
Loading…
Reference in New Issue
Block a user