Compare commits

...

7 Commits

Author SHA1 Message Date
John Locke
7b379e31c5 Bump version 2016-03-28 14:42:37 -07:00
John Locke
74b62255be Merge pull request #1 from maikkeli/dockerfile-reorder
Reorder dockerfile commands to optimise caching of docker layers
2016-01-27 07:51:49 -08:00
maikkeli
34852d3c1d restore comment 2016-01-28 00:58:02 +10:30
maikkeli
469dc75708 Reorder dockerfile commands to optimise caching 2016-01-27 20:23:47 +10:30
John Locke
a057cbdfc5 ledgersmb.conf.default has moved to conf/. Update start.sh. 2016-01-08 09:37:25 -08:00
John Locke
3578ef79e3 Search for perl5lib path -- it has changed on us 2016-01-04 22:04:07 -08:00
John Locke
376ed18c81 Move scripts to /usr/local/bin, cleanup 2016-01-04 22:03:54 -08:00
2 changed files with 31 additions and 26 deletions

View File

@@ -1,10 +1,6 @@
FROM perl:5
MAINTAINER Freelock john@freelock.com
# Build time variables
ENV LSMB_VERSION 1.5.0-beta3
# Install Perl, Tex, Starman, psql client, and all dependencies
RUN DEBIAN_FRONTENT=noninteractive && \
apt-get update && apt-get -y install \
@@ -25,8 +21,25 @@ RUN DEBIAN_FRONTENT=noninteractive && \
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
@@ -54,28 +67,13 @@ 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
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
# 1.5 requirements
RUN apt-get install -y \
libpgobject-perl \
libpgobject-simple-perl \
libpgobject-simple-role-perl \
libpgobject-util-dbmethod-perl
RUN cpanm -nq \
Carton PGObject::Type::BigFloat \
PGObject::Composite \
PGObject::Type::JSON \
PGObject::Type::Composite \
PGObject::Type::DateTime \
App::LedgerSMB::Admin
# 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

View File

@@ -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" \
@@ -19,7 +19,14 @@ if [ ! -z ${CREATE_DATABASE+x} ]; then
fi
# Needed for modules loaded by cpanm
export PERL5LIB=/usr/local/lib/perl5/site_perl/5.22.0
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