mirror of
https://github.com/ledgersmb/ledgersmb-docker.git
synced 2025-10-14 00:00:29 -04:00
Compare commits
16 Commits
1.4.26
...
1.5.0-beta
Author | SHA1 | Date | |
---|---|---|---|
|
7b379e31c5 | ||
|
74b62255be | ||
|
34852d3c1d | ||
|
469dc75708 | ||
|
a057cbdfc5 | ||
|
3578ef79e3 | ||
|
376ed18c81 | ||
|
d1ce52d26f | ||
|
2679a71a79 | ||
|
11b9c43044 | ||
|
aa6a9d5b12 | ||
|
30a4f5ea91 | ||
|
2235f035a0 | ||
|
e20f3a1899 | ||
|
07db28af99 | ||
|
2f7155e599 |
44
Dockerfile
44
Dockerfile
@@ -1,10 +1,6 @@
|
||||
FROM perl:5
|
||||
MAINTAINER Freelock john@freelock.com
|
||||
|
||||
# Build time variables
|
||||
ENV LSMB_VERSION 1.4.26
|
||||
|
||||
|
||||
# Install Perl, Tex, Starman, psql client, and all dependencies
|
||||
RUN DEBIAN_FRONTENT=noninteractive && \
|
||||
apt-get update && apt-get -y install \
|
||||
@@ -19,17 +15,31 @@ RUN DEBIAN_FRONTENT=noninteractive && \
|
||||
libconfig-inifiles-perl libnamespace-autoclean-perl \
|
||||
libcarp-always-perl libjson-perl \
|
||||
libtemplate-plugin-latex-perl texlive-latex-recommended \
|
||||
texlive-latex-base texlive-latex-extra \
|
||||
texlive-xetex \
|
||||
libnet-tclink-perl \
|
||||
libxml-twig-perl \
|
||||
libtex-encode-perl \
|
||||
libdevel-trace-perl \
|
||||
starman \
|
||||
postgresql-client-9.4 \
|
||||
ssmtp
|
||||
|
||||
# Install LedgerSMB
|
||||
# 1.5 requirements
|
||||
RUN apt-get install -y \
|
||||
libpgobject-perl \
|
||||
libpgobject-simple-perl \
|
||||
libpgobject-simple-role-perl \
|
||||
libpgobject-util-dbmethod-perl \
|
||||
&& cpanm -nq \
|
||||
Carton \
|
||||
PGObject::Type::BigFloat \
|
||||
PGObject::Composite \
|
||||
PGObject::Type::JSON \
|
||||
PGObject::Type::Composite \
|
||||
PGObject::Type::DateTime \
|
||||
App::LedgerSMB::Admin
|
||||
|
||||
# Build time variables
|
||||
ENV LSMB_VERSION 1.5.0-beta4
|
||||
|
||||
# Install LedgerSMB
|
||||
RUN cd /srv && \
|
||||
git clone https://github.com/ledgersmb/LedgerSMB.git ledgersmb
|
||||
|
||||
@@ -57,20 +67,16 @@ ENV SSMTP_FROMLINE_OVERRIDE YES
|
||||
|
||||
ENV POSTGRES_HOST postgres
|
||||
|
||||
COPY start.sh /usr/bin/start.sh
|
||||
COPY update_ssmtp.sh /usr/bin/update_ssmtp.sh
|
||||
|
||||
#RUN cpanm \
|
||||
# CGI::Compile
|
||||
|
||||
COPY start.sh /usr/local/bin/start.sh
|
||||
COPY update_ssmtp.sh /usr/local/bin/update_ssmtp.sh
|
||||
|
||||
RUN chown www-data /etc/ssmtp /etc/ssmtp/ssmtp.conf && \
|
||||
chmod +x /usr/bin/update_ssmtp.sh /usr/bin/start.sh && \
|
||||
chmod +x /usr/local/bin/update_ssmtp.sh /usr/local/bin/start.sh && \
|
||||
mkdir -p /var/www
|
||||
|
||||
# Work around an aufs bug related to directory permissions:
|
||||
RUN mkdir -p /tmp && \
|
||||
chmod 1777 /tmp
|
||||
# Not sure why this is not set correctly, and also why
|
||||
# it gets overridden here -- moved to start.sh.
|
||||
# ENV PERL5LIB /usr/local/lib/perl5/site_perl/5.22.0
|
||||
|
||||
# Internal Port Expose
|
||||
EXPOSE 5000
|
||||
|
19
start.sh
19
start.sh
@@ -1,10 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
update_ssmtp.sh
|
||||
|
||||
cd /srv/ledgersmb
|
||||
|
||||
if [[ ! -f ledgersmb.conf ]]; then
|
||||
cp ledgersmb.conf.default ledgersmb.conf
|
||||
cp conf/ledgersmb.conf.default ledgersmb.conf
|
||||
sed -i \
|
||||
-e "s/\(cache_templates = \).*\$/cache_templates = 1/g" \
|
||||
-e "s/\(host = \).*\$/\1$POSTGRES_HOST/g" \
|
||||
@@ -13,11 +13,20 @@ if [[ ! -f ledgersmb.conf ]]; then
|
||||
fi
|
||||
|
||||
if [ ! -z ${CREATE_DATABASE+x} ]; then
|
||||
perl tools/prepare-company-database.pl --company $CREATE_DATABASE \
|
||||
perl tools/dbsetup.pl --company $CREATE_DATABASE \
|
||||
--host $POSTGRES_HOST \
|
||||
--owner postgres \
|
||||
--password "$POSTGRES_PASS"
|
||||
--postgres_password "$POSTGRES_PASS"
|
||||
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";
|
||||
echo -e "\tmaybe: $PerlLib";
|
||||
}
|
||||
done ;
|
||||
echo "Selected PERL5LIB=$PERL5LIB";
|
||||
|
||||
# start ledgersmb
|
||||
exec starman tools/starman.psgi
|
||||
|
Reference in New Issue
Block a user