Compare commits

..

4 Commits
1.4.42 ... 1.3

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
3 changed files with 9 additions and 37 deletions

View File

@@ -1,6 +1,9 @@
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 && \
@@ -16,32 +19,20 @@ 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.6 \
postgresql-client-9.4 \
ssmtp
# Build time variables
ENV LSMB_VERSION 1.4.42
# Install LedgerSMB
RUN cd /srv && \
git clone -b $LSMB_VERSION https://github.com/ledgersmb/LedgerSMB.git ledgersmb
git clone https://github.com/ledgersmb/LedgerSMB.git ledgersmb
WORKDIR /srv/ledgersmb
# 1.4.29+ requirements
RUN cpanm --quiet --notest \
--with-feature=starman \
--with-feature=latex-pdf-ps \
--with-feature=openoffice \
--installdeps .
RUN git checkout $LSMB_VERSION
#RUN sed -i \
# -e "s/short_open_tag = Off/short_open_tag = On/g" \
@@ -62,24 +53,15 @@ 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/bin/start.sh
COPY update_ssmtp.sh /usr/bin/update_ssmtp.sh
#RUN cpanm \
# CGI::Compile
RUN chown www-data /etc/ssmtp /etc/ssmtp/ssmtp.conf && \
chmod +x /usr/bin/update_ssmtp.sh /usr/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 5000
#USER www-data

View File

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