Compare commits

..

85 Commits

Author SHA1 Message Date
Erik Huelsmann
293ce6cd10 Update README.md (mark all branches End-of-Life) 2024-10-21 23:46:06 +02:00
Erik Huelsmann
bb6d50e1a9 Change the hosting location of the LedgerSMB Docker images 2022-01-28 22:54:46 +01:00
Erik Huelsmann
9d23fabbe4 Change image in order to be able to rebuild image lost due to Docker Hub throwing our images away... 2022-01-28 22:32:48 +01:00
Erik Huelsmann
4caeb3822c * Automatic Dockerfile update by release process 2019-11-29 09:42:28 +00:00
Erik Huelsmann
75643ab3c1 * Automatic Dockerfile update by release process 2019-11-15 16:22:44 +00:00
Erik Huelsmann
3d3eb39aee * Automatic Dockerfile update by release process 2019-11-02 15:00:12 +00:00
Erik Huelsmann
65f32b6208 * Automatic Dockerfile update by release process 2019-10-18 11:07:41 +00:00
Erik Huelsmann
ff99b0e596 * Automatic Dockerfile update by release process 2019-09-29 19:20:23 +00:00
Erik Huelsmann
fdc17840d8 * Automatic Dockerfile update by release process 2019-08-18 20:23:20 +00:00
Erik Huelsmann
ea0fbaab99 * Automatic Dockerfile update by release process 2018-12-25 23:23:49 +00:00
Erik Huelsmann
00335a0c04 * Automatic Dockerfile update by release process 2018-12-16 17:17:21 +00:00
Erik Huelsmann
d5e0648af3 * Automatic Dockerfile update by release process 2018-12-14 11:24:37 +00:00
Erik Huelsmann
5ce2cf5310 * Automatic Dockerfile update by release process 2018-05-31 20:40:48 +00:00
Erik Huelsmann
b2b13409b5 * Add option to set the number of Starman workers 2018-05-23 23:20:36 +02:00
Erik Huelsmann
f5306a1e3e * Adjust database host name so that the Compose setup works out-of-the-box again 2018-05-23 21:48:03 +02:00
Erik Huelsmann
681a604143 * Add documentation of the availability of a 'ports' statement
Note that we found in the LedgerSMB Matrix chat channel that users
need more straight forward ways to quickly evaluate our proposition
which they are able to offer if we skip the TLS requirement

Also note that the TLS requirement requires a domain, which some
might not have at the stage where the system is only being evaluated.
2018-05-23 21:43:12 +02:00
Erik Huelsmann
5b4970253c * Automatic Dockerfile update by release process 2018-04-14 07:52:39 +00:00
Erik Huelsmann
3d0b2b2a90 * Automatic Dockerfile update by release process 2018-04-02 18:55:35 +00:00
Erik Huelsmann
c616d6f8ab * Add docker-compose file and add it to the README 2018-03-12 22:39:35 +01:00
Erik Huelsmann
f69a36a5d3 * Automatic Dockerfile update by release process 2018-03-11 10:35:54 +00:00
Erik Huelsmann
dbed029289 * Automatic Dockerfile update by release process 2018-02-26 16:55:54 +00:00
Erik Huelsmann
dfa82a63bf * Correct liberation fonts package name (*2 is available as of stretch) 2018-02-17 21:43:41 +01:00
Erik Huelsmann
9353e8187f * Add fonts missing for xedemo template set 2018-02-17 21:36:25 +01:00
Erik Huelsmann
a1ea9d9895 * Why was curl suddenly gone? Anyway, re-adding 2018-02-14 20:47:55 +01:00
Erik Huelsmann
0f8af754bd * Fix syntax (double &&) which chokes Docker Hub's builds 2018-02-14 20:33:04 +01:00
Erik Huelsmann
da48259b68 Merge pull request #18 from sbts/1.5-dev-enhancement-latest-pg-tools
1.5 - install latest version of `postgresql-client`
2018-02-06 22:17:26 +01:00
sbts
774e6ef6e2 install latest version of postgresql-client
This is required to handle cases where the PG server is running a newer version than this container has available.
Failing to do this update will normally cause odd problems, including silent failure to backup.
Instead of the expected backup an empty file is generated.
Also ensure
- an upgrade
- and some apt cleanup

are done.
2018-02-07 04:05:30 +08:00
Erik Huelsmann
0d8517ebc4 * Update to 1.5.16 2018-01-28 19:56:26 +01:00
Erik Huelsmann
f7cfcc72ec * Add more documentation regarding container mail configuration 2018-01-24 21:55:29 +01:00
Erik Huelsmann
847efed2d0 * Dockerfile update to track the latest 1.5 2018-01-07 22:10:30 +01:00
Erik Huelsmann
9d5b62b6bb * Close #15 for the 1.5-slim branch 2018-01-06 14:16:56 +01:00
Erik Huelsmann
e23e85fea8 * Clean out man pages for smaller image 2018-01-01 11:44:32 +01:00
Erik Huelsmann
c4a1a6f1cc * Fix PostgreSQL installation 2018-01-01 11:27:39 +01:00
Erik Huelsmann
90764650c5 * Fix PostgreSQL installation 2018-01-01 11:15:39 +01:00
Erik Huelsmann
795fdf3f95 * Fix PostgreSQL installation 2018-01-01 11:05:22 +01:00
Erik Huelsmann
6cceef46f6 * Build on the jessie-slim image for a smaller image 2017-12-31 17:53:32 +01:00
Erik Huelsmann
e29aa14d57 * Remove a few layers from the 1.5 images 2017-12-31 17:46:21 +01:00
Erik Huelsmann
a22ed7ac49 * Automatic Dockerfile update by release process 2017-12-08 16:54:59 +00:00
Erik Huelsmann
1f1df000b8 * Sync rewritten README.md from master 2017-10-30 21:45:58 +01:00
Erik Huelsmann
fe867c9925 * Automatic Dockerfile update by release process 2017-10-29 21:39:46 +00:00
Erik Huelsmann
9ff64318ab * In the 'build LedgerSMB' step, don't change directories 2017-09-20 22:22:22 +02:00
Erik Huelsmann
46ae598da0 * Automatic Dockerfile update by release process 2017-09-18 10:27:13 +00:00
Erik Huelsmann
1387c10fd1 * Automatic Dockerfile update by release process 2017-09-12 19:28:31 +00:00
Erik Huelsmann
cbb3a0d843 * Automatic Dockerfile update by release process 2017-09-03 18:55:01 +00:00
Erik Huelsmann
0e41af2b67 * Since the last command removed the lists, update before installation 2017-08-13 20:49:16 +02:00
Erik Huelsmann
a30d23bbb6 * Remove /var/lib/apt/lists/* for further space savings 2017-08-13 20:34:14 +02:00
Erik Huelsmann
e10bd36b80 * Add back USER statement accidentally removed in d038488 2017-08-06 19:50:32 +02:00
Erik Huelsmann
1a56d1523d * Update Dockerfile with performance dependency
As noted by John, requests improve by a factor 10 (20-30secs -> 2-3secs)
with this dependency in place.
2017-08-04 23:39:18 +02:00
Erik Huelsmann
aa260dcec9 * Automatic Dockerfile update by release process 2017-07-22 19:02:34 +00:00
Erik Huelsmann
402f541a5e * Download from download.ledgersmb.org instead of GitHub
(uploading to GitHub doesn't work for non-tagged releases such as betas)
2017-07-20 22:57:48 +02:00
Erik Huelsmann
9499b6ffc1 Merge pull request #13 from sbts/1.5_don't_write_to_server_dir
drop need to write config file to /srv/ledgersmb
2017-07-09 08:39:58 +02:00
sbts
d0384889a8 drop need to write config file to /srv/ledgersmb
Instead write it to /tmp.
Also don't copy the entire example file, just write the bits we need
2017-07-02 01:07:04 +08:00
Erik Huelsmann
2d4bb886f8 * Automatic Dockerfile update by release process 2017-06-25 15:44:29 +00:00
Erik Huelsmann
8e3f80f65f * Remove downloaded tar from the resulting container 2017-06-21 00:23:07 +02:00
Erik Huelsmann
cd29bd895f * Remove more temporary artifacts from the build process 2017-06-21 00:03:36 +02:00
Erik Huelsmann
42e6eb783e * Reorganize commands for slimmer image 2017-06-20 07:59:10 +02:00
Erik Huelsmann
09cf2e16b7 Update Dockerfile for 1.5.7 release 2017-06-01 19:13:22 +02:00
Erik Huelsmann
2a5dff2dd7 * Don't build Dojo on release branches: be download pre-built. 2017-06-01 09:18:00 +02:00
Erik Huelsmann
e2bf781058 * Reduce image size further by changing base image 2017-06-01 08:27:51 +02:00
Erik Huelsmann
1148c219ec * Minimize the size of the image (went from 2.6GB to 1.4GB!) 2017-06-01 08:23:00 +02:00
Erik Huelsmann
e5c6072505 * use '--preload-app' to start starman 2017-05-25 16:07:38 +02:00
Erik Huelsmann
728840ce4c * Update Dockerfile to 1.5.6 2017-04-09 14:44:12 +00:00
John Locke
5f45abdf2d Create /tmp/ledgersmb if not exists 2017-03-14 13:50:53 -07:00
John Locke
8afea54d65 Fix ssmtp update script 2017-03-14 13:41:59 -07:00
John Locke
326790de44 Update postgres client libs to 9.6, fixes ledgersmb/ledgersmb#2686 , older pg_dump aborts when connecting to newer postgres server. 2017-03-14 10:15:01 -07:00
Erik Huelsmann
c4a5359b25 * Update to 1.5.5 2017-03-14 14:08:13 +00:00
John Locke
79be91758b Update README on latest branch. 2017-03-13 15:37:12 -07:00
John Locke
4706963a2b 1.5.4 2017-03-13 13:55:57 -07:00
John Locke
2c22bd6bbb 1.5.3 2017-02-11 07:47:00 -08:00
John Locke
d3897c8439 1.5.2 2017-01-23 06:46:44 -08:00
John Locke
6d4d4fa927 Run as www-data user, with permission to write ledgersmb.conf file.
Fixes #6.
2017-01-14 09:09:37 -08:00
John Locke
8f911b4d3e 1.5.1 2017-01-08 10:59:02 -08:00
John Locke
60af8d5d49 Add LPR package to image 2017-01-05 08:48:46 -08:00
John Locke
2bf51fb145 Try different download mirror 2016-12-30 11:02:21 -08:00
John Locke
6e41334061 Try again to get the correct path 2016-12-30 10:43:19 -08:00
John Locke
f3f924eab9 Update to full release path. 2016-12-30 10:19:47 -08:00
John Locke
e456434514 1.5.0 2016-12-30 09:43:11 -08:00
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
5 changed files with 78 additions and 98 deletions

View File

@@ -1,94 +1,69 @@
FROM debian:stretch
FROM debian:stretch-slim
MAINTAINER Freelock john@freelock.com
# Build time variables
ENV LSMB_VERSION 1.5.30
# 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...
# 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 \
wget ca-certificates gnupg \
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 && \
apt-get dist-upgrade -y && apt-get -y install \
gnupg2 curl wget ca-certificates \
libcgi-emulate-psgi-perl libcgi-simple-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 \
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-lite-perl libmime-types-perl \
libmath-bigint-gmp-perl libmodule-runtime-perl libmoose-perl \
libmoosex-nonmoose-perl libnumber-format-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-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 \
libplack-middleware-reverseproxy-perl \
libtemplate-perl libtext-csv-perl libtext-csv-xs-perl \
libtext-markdown-perl libxml-simple-perl \
libpgobject-util-dbmethod-perl libplack-perl libtemplate-perl \
libnamespace-autoclean-perl \
libimage-size-perl \
libtemplate-plugin-latex-perl libtex-encode-perl \
libclass-c3-xs-perl \
libmoosex-nonmoose-perl libclass-c3-xs-perl \
texlive-latex-recommended \
texlive-xetex fonts-liberation \
starman \
libopenoffice-oodoc-perl \
postgresql-client \
ssmtp \
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/*
# Build time variables
ENV LSMB_VERSION 1.7.0-beta1
ENV NODE_PATH /usr/local/lib/node_modules
###########################################################
# 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) && \
DEBIAN_FRONTEND=noninteractive apt-get -y install git cpanminus make gcc libperl-dev && \
curl -Lo /tmp/ledgersmb-$LSMB_VERSION.tar.gz "https://download.ledgersmb.org/f/Releases/$LSMB_VERSION/ledgersmb-$LSMB_VERSION.tar.gz" && \
tar -xvzf /tmp/ledgersmb-$LSMB_VERSION.tar.gz --directory /srv && \
rm -f /tmp/ledgersmb-$LSMB_VERSION.tar.gz && \
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/*
--installdeps /srv/ledgersmb/ && \
apt-get purge -y git cpanminus make gcc libperl-dev && \
apt-get autoremove -y && \
apt-get autoclean && \
rm -rf ~/.cpanm/ && \
rm -rf /var/lib/apt/lists/* /usr/share/man/*
# Cleanup args that are for internal use
ENV DOJO_Build_Deps=
ENV DOJO_Build_Deps_removal=
ENV NODE_PATH=
WORKDIR /srv/ledgersmb
# master requirements
# Configure outgoing mail to use host, other run time variable defaults

View File

@@ -1,16 +1,13 @@
# 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.4`, `1.4.x` - Latest tagged release of git 1.4 branch
- `1.5`, `1.5.30` - Last release tarball from 1.5 branch (End-of-Life)
- `1.4`, `1.4.42` - Last tagged release of git 1.4 branch (End-of-Life)
- `master` - Master branch from git, unstable
- `master-dev`, `1.5-dev` - Containers to kick off a development setup
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 +35,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.5/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 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 +74,7 @@ please use these commands instead:
postgres:latest
```
### Start LedgerSMB
## Start LedgerSMB
```plain
$ docker run -d -p 5762:5762 --name myledger \
@@ -94,7 +85,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 +139,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`)

View File

@@ -28,7 +28,7 @@ services:
lsmb:
depends_on:
- postgres
image: ledgersmb/ledgersmb:1.6
image: ghcr.io/ledgersmb/ledgersmb:1.5
networks:
- internal
- default

View File

@@ -20,6 +20,9 @@ EOF
export LSMB_CONFIG_FILE='/tmp/ledgersmb.conf'
fi
if [ ! -f "/tmp/ledgersmb" ]; then
mkdir /tmp/ledgersmb
fi
# Currently unmaintained/untested
# if [ ! -z ${CREATE_DATABASE+x} ]; then
# perl tools/dbsetup.pl --company $CREATE_DATABASE \
@@ -27,10 +30,19 @@ fi
# --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
# --preload-app allows application initialization to kill the entire
# starman instance (instead of just the worker, which will immediately
# 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
exec starman --port 5762 --workers ${LSMB_WORKERS:-5} --preload-app tools/starman.psgi

View File

@@ -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
}