Compare commits

..

8 Commits

Author SHA1 Message Date
John Locke
5cbc5e6f7f Fix grep flag 2015-11-19 12:01:08 -08:00
John Locke
a3409267f4 Patch from dcg: detect /etc/ssmtp.conf changes inside update script, instead of touching a /tmp file 2015-11-19 11:59:47 -08:00
John Locke
b66d8bbfee Update readme for versions built 2015-08-01 10:11:12 -07:00
John Locke
503569f472 Create 1.3 branch 2015-08-01 10:06:49 -07:00
John Locke
29ff9a39ab README improvements 2015-07-05 13:44:47 -07:00
John Locke
4a4a964975 Fix args for prepare-company-database.pl 2015-07-05 12:17:13 -07:00
John Locke
65bb0d35ff Use create-company-database script for test data creation 2015-07-05 11:48:48 -07:00
John Locke
7f0a677a09 Doc fixes 2015-07-05 09:08:03 -07:00
2 changed files with 15 additions and 40 deletions

View File

@@ -1,6 +1,10 @@
FROM perl:5
FROM debian:jessie
MAINTAINER Freelock john@freelock.com
# Build time variables
ENV LSMB_VERSION 1.3
# Install Perl, Tex, Starman, psql client, and all dependencies
RUN DEBIAN_FRONTENT=noninteractive && \
apt-get update && apt-get -y install \
@@ -21,25 +25,8 @@ RUN DEBIAN_FRONTENT=noninteractive && \
postgresql-client-9.4 \
ssmtp
# 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
@@ -67,17 +54,14 @@ ENV SSMTP_FROMLINE_OVERRIDE YES
ENV POSTGRES_HOST postgres
COPY start.sh /usr/local/bin/start.sh
COPY update_ssmtp.sh /usr/local/bin/update_ssmtp.sh
COPY start.sh /usr/bin/start.sh
COPY update_ssmtp.sh /usr/bin/update_ssmtp.sh
RUN chown www-data /etc/ssmtp /etc/ssmtp/ssmtp.conf && \
chmod +x /usr/local/bin/update_ssmtp.sh /usr/local/bin/start.sh && \
chmod +x /usr/bin/update_ssmtp.sh /usr/bin/start.sh && \
mkdir -p /var/www
# 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
#USER www-data

View File

@@ -1,10 +1,10 @@
#!/bin/bash
update_ssmtp.sh
cd /srv/ledgersmb
if [[ ! -f ledgersmb.conf ]]; then
cp conf/ledgersmb.conf.default ledgersmb.conf
cp ledgersmb.conf.default ledgersmb.conf
sed -i \
-e "s/\(cache_templates = \).*\$/cache_templates = 1/g" \
-e "s/\(host = \).*\$/\1$POSTGRES_HOST/g" \
@@ -13,20 +13,11 @@ if [[ ! -f ledgersmb.conf ]]; then
fi
if [ ! -z ${CREATE_DATABASE+x} ]; then
perl tools/dbsetup.pl --company $CREATE_DATABASE \
perl tools/prepare-company-database.pl --company $CREATE_DATABASE \
--host $POSTGRES_HOST \
--postgres_password "$POSTGRES_PASS"
--owner 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