Compare commits

...

8 Commits

Author SHA1 Message Date
John Locke
71de84bd9e 1.5.0-rc3 2016-12-12 08:38:25 -08:00
John Locke
262bf6e1f4 Set correct ssmtp path 2016-09-25 10:54:16 -07:00
John Locke
fdd2eed8a6 Fix missing && after downloading tarball 2016-08-21 12:45:49 -07:00
John Locke
76c35fa0d5 1.5.0-rc2 2016-08-20 09:13:33 -07:00
John Locke
dc0770e367 1.5.0-rc2 2016-08-20 09:02:15 -07:00
John Locke
3839f3b105 Add support for #4 - Make Postgres port configurable at run time 2016-08-20 08:56:41 -07:00
John Locke
9839ceaa2b Add new libmoosex-nonmoose-perl dependency 2016-05-30 08:58:36 -07:00
John Locke
48f1e0d7bb 1.5 Dockerfile to install from tarball 2016-05-30 00:23:58 -07:00
3 changed files with 36 additions and 27 deletions

View File

@@ -4,36 +4,33 @@ MAINTAINER Freelock john@freelock.com
# Install Perl, Tex, Starman, psql client, and all dependencies
RUN DEBIAN_FRONTENT=noninteractive && \
apt-get update && apt-get -y install \
git \
libdatetime-perl libdbi-perl libdbd-pg-perl \
libcgi-simple-perl libtemplate-perl libmime-lite-perl \
liblocale-maketext-lexicon-perl libtest-exception-perl \
libtest-trap-perl liblog-log4perl-perl libmath-bigint-gmp-perl \
libfile-mimeinfo-perl libtemplate-plugin-number-format-perl \
libdatetime-format-strptime-perl libconfig-general-perl \
libdatetime-format-strptime-perl libio-stringy-perl libmoose-perl \
libconfig-inifiles-perl libnamespace-autoclean-perl \
libcarp-always-perl libjson-perl \
libtemplate-plugin-latex-perl texlive-latex-recommended \
libnet-tclink-perl \
libxml-twig-perl \
libcgi-emulate-psgi-perl libcgi-simple-perl libconfig-inifiles-perl \
libdbd-pg-perl libdbi-perl libdatetime-perl \
libdatetime-format-strptime-perl libdigest-md5-perl \
libfile-mimeinfo-perl libjson-xs-perl libjson-perl \
liblocale-maketext-perl liblocale-maketext-lexicon-perl \
liblog-log4perl-perl libmime-base64-perl libmime-lite-perl \
libmath-bigint-gmp-perl libmoose-perl libnumber-format-perl \
libpgobject-perl libpgobject-simple-perl libpgobject-simple-role-perl \
libpgobject-util-dbmethod-perl libplack-perl libtemplate-perl \
libnamespace-autoclean-perl \
libtemplate-plugin-latex-perl libtex-encode-perl \
libmoosex-nonmoose-perl \
texlive-latex-recommended \
texlive-xetex \
starman \
postgresql-client-9.4 \
libopenoffice-oodoc-perl \
postgresql-client \
ssmtp
# Nodejs for doing Dojo build
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - && \
apt-get install -y nodejs
# Java is required for closure compiler in Dojo build
RUN DEBIAN_FRONTENT=noninteractive && apt-get install -y openjdk-7-jre
# Build time variables
ENV LSMB_VERSION 1.5.0-beta-5
ENV LSMB_VERSION 1.5.0-rc3
# Install LedgerSMB
RUN cd /srv && \
git clone --recursive -b master https://github.com/ledgersmb/LedgerSMB.git ledgersmb
curl -Lo ledgersmb-$LSMB_VERSION.tar.gz http://downloads.sourceforge.net/project/ledger-smb/Beta%20Releases/$LSMB_VERSION/ledgersmb-$LSMB_VERSION.tar.gz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fledger-smb%2Ffiles%2FBeta%2520Releases%2F$LSMB_VERSION%2F&ts=1471709449&use_mirror=heanet && \
tar -xvzf ledgersmb-$LSMB_VERSION.tar.gz
# https://sourceforge.net/projects/ledger-smb/files/Releases/$LSMB_VERSION/ledgersmb-$LSMB_VERSION.tar.gz/download && \
WORKDIR /srv/ledgersmb
@@ -44,9 +41,6 @@ RUN cpanm --quiet --notest \
--with-feature=openoffice \
--installdeps .
# Build dojo
RUN make dojo
# Configure outgoing mail to use host, other run time variable defaults
## sSMTP
@@ -60,6 +54,8 @@ ENV SSMTP_FROMLINE_OVERRIDE YES
#ENV SSMTP_AUTH_METHOD
ENV POSTGRES_HOST postgres
ENV POSTGRES_PORT 5432
ENV DEFAULT_DB lsmb
COPY start.sh /usr/local/bin/start.sh
COPY update_ssmtp.sh /usr/local/bin/update_ssmtp.sh
@@ -68,6 +64,9 @@ RUN chown www-data /etc/ssmtp /etc/ssmtp/ssmtp.conf && \
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
# Internal Port Expose
EXPOSE 5762

View File

@@ -62,6 +62,14 @@ This environment variable is used to specify the hostname of the Postgres server
If you set this to another hostname, LedgerSMB will attempt to connect to that hostname instead.
## `POSTGRES_PORT` = 5432
Port to connect to Postgres on. Use to connect to a Postgres server running on an alternate port.
## `DEFAULT_DB` = lsmb
Set this if you want to automatically log in to a particular LSMB database.
### `SSMTP_ROOT` `SSMTP_MAILHUB` `SSMTP_HOSTNAME` `SSMTP_USE_STARTTLS` `SSMTP_AUTH_USER` `SSMTP_AUTH_PASS` `SSMTP_METHOD` `SSMTP_FROMLINE_OVERRIDE`
These variables are used to set outgoing SMTP defaults. To set the outgoing email address, set SSMTP_ROOT, and SSMTP_HOSTNAME at a minimum -- SSMTP_MAILHUB defaults to the default docker0 interface, so if your host is already configured to relay mail, this should relay successfully with only those two set.

View File

@@ -8,7 +8,9 @@ if [[ ! -f ledgersmb.conf ]]; then
sed -i \
-e "s/\(cache_templates = \).*\$/cache_templates = 1/g" \
-e "s/\(host = \).*\$/\1$POSTGRES_HOST/g" \
-e "s%\(sendmail = \).*%\1/usr/bin/ssmtp%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
fi