mirror of
https://github.com/ledgersmb/ledgersmb-docker.git
synced 2025-10-14 08:10:30 -04:00
Compare commits
37 Commits
1.5.0-beta
...
1.4.42
Author | SHA1 | Date | |
---|---|---|---|
|
a11c9f5368 | ||
|
69da0a5e21 | ||
|
b7b66f6a13 | ||
|
6506865f50 | ||
|
b544f42752 | ||
|
57e54605fa | ||
|
308171c708 | ||
|
b549b8a143 | ||
|
9cda9c1dd3 | ||
|
7761c46712 | ||
|
3bfa2a5ae3 | ||
|
51f3dc8ab8 | ||
|
2629d4052f | ||
|
c022a84d14 | ||
|
2add82e070 | ||
|
beab963859 | ||
|
6772ccbe4d | ||
|
b7ac6ef4cb | ||
|
ddd44782c7 | ||
|
4448e9b270 | ||
|
3b3613dd13 | ||
|
9a789a8032 | ||
|
d61ce704c2 | ||
|
048e003a43 | ||
|
3e3915cfc9 | ||
|
30efe577bb | ||
|
052557897e | ||
|
0e50f0bada | ||
|
d2faf23967 | ||
|
ba69402221 | ||
|
46039f99e9 | ||
|
f2a7c0ada6 | ||
|
890f0c4931 | ||
|
29ff9a39ab | ||
|
4a4a964975 | ||
|
65bb0d35ff | ||
|
7f0a677a09 |
54
Dockerfile
54
Dockerfile
@@ -1,6 +1,7 @@
|
||||
FROM perl:5
|
||||
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 \
|
||||
@@ -15,37 +16,32 @@ RUN DEBIAN_FRONTENT=noninteractive && \
|
||||
libconfig-inifiles-perl libnamespace-autoclean-perl \
|
||||
libcarp-always-perl libjson-perl \
|
||||
libtemplate-plugin-latex-perl texlive-latex-recommended \
|
||||
libnet-tclink-perl \
|
||||
texlive-latex-base texlive-latex-extra \
|
||||
texlive-xetex \
|
||||
libxml-twig-perl \
|
||||
libtex-encode-perl \
|
||||
libdevel-trace-perl \
|
||||
starman \
|
||||
postgresql-client-9.4 \
|
||||
postgresql-client-9.6 \
|
||||
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
|
||||
ENV LSMB_VERSION 1.4.42
|
||||
|
||||
# Install LedgerSMB
|
||||
|
||||
RUN cd /srv && \
|
||||
git clone https://github.com/ledgersmb/LedgerSMB.git ledgersmb
|
||||
git clone -b $LSMB_VERSION https://github.com/ledgersmb/LedgerSMB.git ledgersmb
|
||||
|
||||
WORKDIR /srv/ledgersmb
|
||||
|
||||
RUN git checkout $LSMB_VERSION
|
||||
|
||||
# 1.4.29+ requirements
|
||||
RUN cpanm --quiet --notest \
|
||||
--with-feature=starman \
|
||||
--with-feature=latex-pdf-ps \
|
||||
--with-feature=openoffice \
|
||||
--installdeps .
|
||||
|
||||
#RUN sed -i \
|
||||
# -e "s/short_open_tag = Off/short_open_tag = On/g" \
|
||||
@@ -66,17 +62,23 @@ 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
|
||||
|
||||
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/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
|
||||
# Work around an aufs bug related to directory permissions:
|
||||
RUN mkdir -p /tmp && \
|
||||
chmod 1777 /tmp
|
||||
|
||||
# Internal Port Expose
|
||||
EXPOSE 5000
|
||||
|
@@ -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.
|
||||
|
23
start.sh
23
start.sh
@@ -1,32 +1,25 @@
|
||||
#!/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" \
|
||||
-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
|
||||
|
||||
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
|
||||
|
Reference in New Issue
Block a user