mirror of
https://github.com/ledgersmb/ledgersmb-docker.git
synced 2025-10-14 16:20:29 -04:00
Compare commits
105 Commits
1.7.0-beta
...
1.7.6
Author | SHA1 | Date | |
---|---|---|---|
|
421c153249 | ||
|
1f40452e92 | ||
|
98c38f998a | ||
|
6d3b30720c | ||
|
aa66d87e15 | ||
|
e06638b048 | ||
|
d71609cae1 | ||
|
8bc4fd8583 | ||
|
52fdf5b65e | ||
|
29abd11efd | ||
|
e9edcaf9ae | ||
|
3a74802fe1 | ||
|
1b9701511e | ||
|
1ff4cc42c3 | ||
|
26b679fe7d | ||
|
82e2dd4839 | ||
|
4cb2cad5c1 | ||
|
c5c0575c94 | ||
|
b4ed837573 | ||
|
fae1cd333e | ||
|
75f3dfd642 | ||
|
5afb58f246 | ||
|
a5d89bc9fe | ||
|
b8795c4811 | ||
|
b828cffad3 | ||
|
36bc6d5ffc | ||
|
59be4f4afa | ||
|
f898c2bb63 | ||
|
c2573f6a7e | ||
|
38ab58e93a | ||
|
d45d0a7182 | ||
|
d640f5e6a0 | ||
|
d7c3bd6038 | ||
|
9c2c5a20c6 | ||
|
ebb6a521ef | ||
|
058848a29a | ||
|
a0053b33b6 | ||
|
a5ca6aa894 | ||
|
c616d6f8ab | ||
|
f69a36a5d3 | ||
|
dbed029289 | ||
|
dfa82a63bf | ||
|
9353e8187f | ||
|
a1ea9d9895 | ||
|
0f8af754bd | ||
|
da48259b68 | ||
|
774e6ef6e2 | ||
|
0d8517ebc4 | ||
|
f7cfcc72ec | ||
|
847efed2d0 | ||
|
9d5b62b6bb | ||
|
e23e85fea8 | ||
|
c4a1a6f1cc | ||
|
90764650c5 | ||
|
795fdf3f95 | ||
|
6cceef46f6 | ||
|
e29aa14d57 | ||
|
a22ed7ac49 | ||
|
1f1df000b8 | ||
|
fe867c9925 | ||
|
9ff64318ab | ||
|
46ae598da0 | ||
|
1387c10fd1 | ||
|
cbb3a0d843 | ||
|
0e41af2b67 | ||
|
a30d23bbb6 | ||
|
e10bd36b80 | ||
|
1a56d1523d | ||
|
aa260dcec9 | ||
|
402f541a5e | ||
|
9499b6ffc1 | ||
|
d0384889a8 | ||
|
2d4bb886f8 | ||
|
8e3f80f65f | ||
|
cd29bd895f | ||
|
42e6eb783e | ||
|
09cf2e16b7 | ||
|
2a5dff2dd7 | ||
|
e2bf781058 | ||
|
1148c219ec | ||
|
e5c6072505 | ||
|
728840ce4c | ||
|
5f45abdf2d | ||
|
8afea54d65 | ||
|
326790de44 | ||
|
c4a5359b25 | ||
|
79be91758b | ||
|
4706963a2b | ||
|
2c22bd6bbb | ||
|
d3897c8439 | ||
|
6d4d4fa927 | ||
|
8f911b4d3e | ||
|
60af8d5d49 | ||
|
2bf51fb145 | ||
|
6e41334061 | ||
|
f3f924eab9 | ||
|
e456434514 | ||
|
71de84bd9e | ||
|
262bf6e1f4 | ||
|
fdd2eed8a6 | ||
|
76c35fa0d5 | ||
|
dc0770e367 | ||
|
3839f3b105 | ||
|
9839ceaa2b | ||
|
48f1e0d7bb |
116
Dockerfile
116
Dockerfile
@@ -1,25 +1,43 @@
|
||||
FROM debian:stretch
|
||||
FROM debian:stretch-slim
|
||||
MAINTAINER Freelock john@freelock.com
|
||||
|
||||
# Build time variables
|
||||
ARG LSMB_VERSION="1.7.6"
|
||||
ARG LSMB_DL_DIR="Releases"
|
||||
|
||||
# Install Perl, Tex, Starman, psql client, and all dependencies
|
||||
#
|
||||
# Without libclass-c3-xs-perl, everything grinds to a halt;
|
||||
# add it, because it's a 'recommends' it the dep tree, which
|
||||
# we're skipping, normally
|
||||
#
|
||||
# Without libclass-c3-xs-perl, performance is terribly slow...
|
||||
# Without libclass-accessor-lite-perl, HTML::Entities won't build from CPAN
|
||||
# libnet-cidr-lite-perl is a dependency for Plack::Builder::Conditionals
|
||||
# which is being installed from CPAN
|
||||
# libtest-requires-perl is a dependency of Module-Build-Pluggable-PPPort
|
||||
# on which HTML::Escape depends
|
||||
|
||||
# Installing psql client directly from instructions at https://wiki.postgresql.org/wiki/Apt
|
||||
# That mitigates issues where the PG instance is running a newer version than this container
|
||||
|
||||
RUN echo "APT::Install-Recommends \"false\";\nAPT::Install-Suggests \"false\";" > /etc/apt/apt.conf.d/00recommends && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-mark hold sensible-utils && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -y update && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -y upgrade && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -y install \
|
||||
# for Buster, add:
|
||||
# libhtml-escape-perl \
|
||||
# libplack-middleware-builder-conditionals-perl \
|
||||
# libplack-request-withencoding-perl \
|
||||
#libversion-compare-perl
|
||||
RUN echo -n "APT::Install-Recommends \"0\";\nAPT::Install-Suggests \"0\";\n" >> /etc/apt/apt.conf && \
|
||||
mkdir -p /usr/share/man/man1/ && \
|
||||
mkdir -p /usr/share/man/man2/ && \
|
||||
mkdir -p /usr/share/man/man3/ && \
|
||||
mkdir -p /usr/share/man/man4/ && \
|
||||
mkdir -p /usr/share/man/man5/ && \
|
||||
mkdir -p /usr/share/man/man6/ && \
|
||||
mkdir -p /usr/share/man/man7/ && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get update -q && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get dist-upgrade -y -q && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -y -q install \
|
||||
wget ca-certificates gnupg \
|
||||
libcgi-emulate-psgi-perl libcgi-simple-perl libconfig-inifiles-perl \
|
||||
libcgi-emulate-psgi-perl libconfig-inifiles-perl \
|
||||
libdbd-pg-perl libdbi-perl libdata-uuid-perl libdatetime-perl \
|
||||
libdatetime-format-strptime-perl libio-stringy-perl \
|
||||
libjson-xs-perl libcpanel-json-xs-perl liblist-moreutils-perl \
|
||||
libdatetime-format-strptime-perl \
|
||||
libio-stringy-perl \
|
||||
libcpanel-json-xs-perl liblist-moreutils-perl \
|
||||
liblocale-maketext-perl liblocale-maketext-lexicon-perl \
|
||||
liblog-log4perl-perl libmime-lite-perl libmime-types-perl \
|
||||
libmath-bigint-gmp-perl libmodule-runtime-perl libmoose-perl \
|
||||
@@ -27,14 +45,15 @@ RUN echo "APT::Install-Recommends \"false\";\nAPT::Install-Suggests \"false\";"
|
||||
libpgobject-perl libpgobject-simple-perl libpgobject-simple-role-perl \
|
||||
libpgobject-type-bigfloat-perl libpgobject-type-datetime-perl \
|
||||
libpgobject-type-bytestring-perl libpgobject-util-dbmethod-perl \
|
||||
libpgobject-util-dbadmin-perl libplack-perl libfile-find-rule-perl \
|
||||
libpgobject-util-dbadmin-perl libplack-perl \
|
||||
libplack-middleware-reverseproxy-perl \
|
||||
libtemplate-perl libtext-csv-perl libtext-csv-xs-perl \
|
||||
libtext-markdown-perl libxml-simple-perl \
|
||||
libtext-markdown-perl libxml-simple-perl \
|
||||
libnamespace-autoclean-perl \
|
||||
libimage-size-perl \
|
||||
libfile-find-rule-perl \
|
||||
libtemplate-plugin-latex-perl libtex-encode-perl \
|
||||
libclass-c3-xs-perl \
|
||||
libclass-c3-xs-perl libclass-accessor-lite-perl \
|
||||
libnet-cidr-lite-perl \
|
||||
texlive-latex-recommended \
|
||||
texlive-xetex fonts-liberation \
|
||||
starman \
|
||||
@@ -43,52 +62,27 @@ RUN echo "APT::Install-Recommends \"false\";\nAPT::Install-Suggests \"false\";"
|
||||
lsb-release && \
|
||||
echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
|
||||
(wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -) && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -y update && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -y install postgresql-client && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -y autoremove && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -y autoclean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -q -y update && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -q -y install postgresql-client && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -q -y install git cpanminus make gcc libperl-dev && \
|
||||
wget --quiet -O /tmp/ledgersmb-$LSMB_VERSION.tar.gz "https://download.ledgersmb.org/f/$LSMB_DL_DIR/$LSMB_VERSION/ledgersmb-$LSMB_VERSION.tar.gz" && \
|
||||
tar -xzf /tmp/ledgersmb-$LSMB_VERSION.tar.gz --directory /srv && \
|
||||
rm -f /tmp/ledgersmb-$LSMB_VERSION.tar.gz && \
|
||||
cpanm --notest \
|
||||
--with-feature=starman \
|
||||
--with-feature=latex-pdf-ps \
|
||||
--with-feature=openoffice \
|
||||
--installdeps /srv/ledgersmb/ && \
|
||||
apt-get purge -q -y git cpanminus make gcc libperl-dev && \
|
||||
apt-get autoremove -q -y && \
|
||||
apt-get autoclean -q && \
|
||||
rm -rf ~/.cpanm/ && \
|
||||
rm -rf /var/lib/apt/lists/* /usr/share/man/*
|
||||
|
||||
|
||||
# Build time variables
|
||||
ENV LSMB_VERSION 1.7.0-beta1
|
||||
ENV NODE_PATH /usr/local/lib/node_modules
|
||||
WORKDIR /srv/ledgersmb
|
||||
|
||||
|
||||
###########################################################
|
||||
# Java & Nodejs for doing Dojo build
|
||||
# Uglify needs to be installed right before 'make dojo'?!
|
||||
|
||||
# These packages are only needed during the dojo build
|
||||
ENV DOJO_Build_Deps git make gcc libperl-dev curl nodejs
|
||||
# These packages can be removed after the dojo build
|
||||
ENV DOJO_Build_Deps_removal ${DOJO_Build_Deps} nodejs
|
||||
|
||||
RUN wget --quiet -O - https://deb.nodesource.com/setup_8.x | bash -
|
||||
RUN DEBIAN_FRONTEND="noninteractive" apt-get -y update && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -y install ${DOJO_Build_Deps} && \
|
||||
cd /srv && \
|
||||
git clone --recursive -b $LSMB_VERSION https://github.com/ledgersmb/LedgerSMB.git ledgersmb && \
|
||||
cd ledgersmb && \
|
||||
(curl -L https://cpanmin.us | perl - App::cpanminus) && \
|
||||
cpanm --quiet --notest \
|
||||
--with-feature=starman \
|
||||
--with-feature=latex-pdf-ps \
|
||||
--with-feature=openoffice \
|
||||
--installdeps . && \
|
||||
npm install uglify-js@">=2.0 <3.0" && \
|
||||
make dojo && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -y purge ${DOJO_Build_Deps_removal} && \
|
||||
rm -rf /usr/local/lib/node_modules && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -y autoremove && \
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -y autoclean && \
|
||||
rm -rf ~/.cpanm && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Cleanup args that are for internal use
|
||||
ENV DOJO_Build_Deps=
|
||||
ENV DOJO_Build_Deps_removal=
|
||||
ENV NODE_PATH=
|
||||
# master requirements
|
||||
|
||||
# Configure outgoing mail to use host, other run time variable defaults
|
||||
|
||||
|
48
README.md
48
README.md
@@ -1,16 +1,12 @@
|
||||
# ledgersmb-docker
|
||||
|
||||
Dockerfile for LedgerSMB Docker image
|
||||
|
||||
# Supported tags
|
||||
|
||||
- `1.6`, `1.6.x`, `latest` - Latest official release from 1.6 branch
|
||||
- `1.5`, `1.5.x` - Latest official release from 1.5 branch
|
||||
- `1.6`, `1.6.x`, `latest` - Latest release tarball from 1.6 branch
|
||||
- `1.5`, `1.5.x` - Latest release tarball from 1.5 branch
|
||||
- `1.4`, `1.4.x` - Latest tagged release of git 1.4 branch
|
||||
- `master` - Master branch from git, unstable
|
||||
|
||||
Containers supporting the development process are provided
|
||||
through the ledgersmb-dev-docker project. See https://github.com/ledgersmb/ledgersmb-dev-docker/blob/master/README.md#getting-started.
|
||||
|
||||
# What is LedgerSMB?
|
||||
|
||||
@@ -38,28 +34,22 @@ to add the TLS layer by applying Nginx or Apache as reverse proxy.
|
||||
Enabling optional functionalities such as outgoing e-mail and printing
|
||||
could require additional setup of a mail service or CUPS printer service.
|
||||
|
||||
# Quickstart
|
||||
|
||||
The quickest way to get this image up and running is by using the
|
||||
`docker-compose` file available through the GitHub repository at:
|
||||
|
||||
https://github.com/ledgersmb/ledgersmb-docker/blob/1.6/docker-compose.yml
|
||||
|
||||
which sets up both this image and a supporting database image for
|
||||
production purposes (i.e. with persistent (database) data, with the
|
||||
exception of one thing: setting up an Nginx or Apache reverse proxy
|
||||
with TLS 1.2/1.3 support -- a requirement if you want to access your
|
||||
installation over any type of network.
|
||||
|
||||
# How to use this image
|
||||
|
||||
This image can be installed either automatically with the Docker compose file
|
||||
manually with docker only.
|
||||
|
||||
## Docker-Compose installation and start
|
||||
|
||||
This image provides `docker-compose.yml` which can be used to pull related
|
||||
images, install them, establish an internal network for their communications,
|
||||
adjust environment variables, start and stop LedgerSMB. The only instructions
|
||||
required, after the optional edition of the file to adjust the environment
|
||||
variables, are:
|
||||
|
||||
```plain
|
||||
$ docker-compose pull
|
||||
$ docker-compose up
|
||||
```
|
||||
|
||||
|
||||
## Manual installation
|
||||
|
||||
### Start a postgres instance
|
||||
## Start a postgres instance
|
||||
|
||||
```plain
|
||||
$ docker run -d --name postgres \
|
||||
@@ -83,7 +73,7 @@ please use these commands instead:
|
||||
postgres:latest
|
||||
```
|
||||
|
||||
### Start LedgerSMB
|
||||
## Start LedgerSMB
|
||||
|
||||
```plain
|
||||
$ docker run -d -p 5762:5762 --name myledger \
|
||||
@@ -94,7 +84,7 @@ This command maps port 5762 of your container to port 5762 in your host. The
|
||||
web application inside the container should now be accessible through
|
||||
http://localhost:5762/setup.pl.
|
||||
|
||||
# Set up LedgerSMB
|
||||
## Set up LedgerSMB
|
||||
|
||||
* Visit http://myledger:5762/setup.pl.
|
||||
* Log in with the "postgres" user and the password `mysecretpassword`
|
||||
@@ -148,6 +138,8 @@ affect the performance experience of users.
|
||||
|
||||
## Mail configuration
|
||||
|
||||
The docker image uses `ssmtp` to send mail.
|
||||
|
||||
* `SSMTP_ROOT` (config: `Root`)
|
||||
* `SSMTP_MAILHUB` (config: `Mailhub`)
|
||||
* `SSMTP_HOSTNAME` (config: `Hostname`)
|
||||
|
11
start.sh
11
start.sh
@@ -20,12 +20,9 @@ EOF
|
||||
export LSMB_CONFIG_FILE='/tmp/ledgersmb.conf'
|
||||
fi
|
||||
|
||||
# Currently unmaintained/untested
|
||||
# if [ ! -z ${CREATE_DATABASE+x} ]; then
|
||||
# perl tools/dbsetup.pl --company $CREATE_DATABASE \
|
||||
# --host $POSTGRES_HOST \
|
||||
# --postgres_password "$POSTGRES_PASS"
|
||||
#fi
|
||||
if [ ! -d "/tmp/ledgersmb" ]; then
|
||||
mkdir -p /tmp/ledgersmb
|
||||
fi
|
||||
|
||||
# start ledgersmb
|
||||
# --preload-app allows application initialization to kill the entire
|
||||
@@ -33,4 +30,4 @@ fi
|
||||
# get restarted); it also has a positive effect on memory use
|
||||
|
||||
exec starman --port 5762 --workers ${LSMB_WORKERS:-5} -I lib -I old/lib \
|
||||
--preload-app bin/ledgersmb-server.psgi
|
||||
--preload-app bin/ledgersmb-server.psgi
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
ConfiguredComment='# install script update_ssmtp.sh has configured ssmtp'
|
||||
grep -qc "$ConfiguredComment" /etc/ssmtp.conf && {
|
||||
grep -qc "$ConfiguredComment" /etc/ssmtp/ssmtp.conf && {
|
||||
echo "smtp configured."
|
||||
exit
|
||||
}
|
||||
|
Reference in New Issue
Block a user