mirror of
https://github.com/ledgersmb/ledgersmb-docker.git
synced 2025-10-14 08:10:30 -04:00
Compare commits
24 Commits
1.11.0-rc1
...
1.10.37
Author | SHA1 | Date | |
---|---|---|---|
|
909ce01ab9 | ||
|
385e9bccd6 | ||
|
e36baa2eed | ||
|
364c7b55d8 | ||
|
d664ef37e3 | ||
|
43dde71ab5 | ||
|
b605d7a13f | ||
|
2b9cc67c97 | ||
|
1041c71942 | ||
|
69920510c5 | ||
|
7f4ea3d2fd | ||
|
901bd3ece8 | ||
|
749c7fd461 | ||
|
6a1ff9096d | ||
|
3fae7e9c67 | ||
|
f9fbfba57a | ||
|
6cfa72e29a | ||
|
d39a26f0f3 | ||
|
0215a3442a | ||
|
05429770c5 | ||
|
a12afdf3b0 | ||
|
9a8ee86b71 | ||
|
fb8e60f24c | ||
|
5d4727641f |
19
Dockerfile
19
Dockerfile
@@ -1,12 +1,12 @@
|
|||||||
# Build time variables
|
# Build time variables
|
||||||
|
|
||||||
ARG SRCIMAGE=debian:bookworm-slim
|
ARG SRCIMAGE=debian:bullseye-slim
|
||||||
|
|
||||||
|
|
||||||
FROM $SRCIMAGE AS builder
|
FROM $SRCIMAGE AS builder
|
||||||
|
|
||||||
ARG LSMB_VERSION="1.11.0-rc1"
|
ARG LSMB_VERSION="1.10.37"
|
||||||
ARG LSMB_DL_DIR="Beta Releases"
|
ARG LSMB_DL_DIR="Releases"
|
||||||
ARG ARTIFACT_LOCATION="https://download.ledgersmb.org/f/$LSMB_DL_DIR/$LSMB_VERSION/ledgersmb-$LSMB_VERSION.tar.gz"
|
ARG ARTIFACT_LOCATION="https://download.ledgersmb.org/f/$LSMB_DL_DIR/$LSMB_VERSION/ledgersmb-$LSMB_VERSION.tar.gz"
|
||||||
|
|
||||||
|
|
||||||
@@ -51,8 +51,8 @@ LABEL org.opencontainers.image.description="LedgerSMB is a full featured double-
|
|||||||
the LedgerSMB project is to bring high quality ERP and accounting capabilities\
|
the LedgerSMB project is to bring high quality ERP and accounting capabilities\
|
||||||
to Small and Midsize Businesses."
|
to Small and Midsize Businesses."
|
||||||
|
|
||||||
ARG LSMB_VERSION="1.11.0-rc1"
|
ARG LSMB_VERSION="1.10.37"
|
||||||
ARG LSMB_DL_DIR="Beta Releases"
|
ARG LSMB_DL_DIR="Releases"
|
||||||
ARG ARTIFACT_LOCATION="https://download.ledgersmb.org/f/$LSMB_DL_DIR/$LSMB_VERSION/ledgersmb-$LSMB_VERSION.tar.gz"
|
ARG ARTIFACT_LOCATION="https://download.ledgersmb.org/f/$LSMB_DL_DIR/$LSMB_VERSION/ledgersmb-$LSMB_VERSION.tar.gz"
|
||||||
|
|
||||||
|
|
||||||
@@ -61,6 +61,8 @@ ARG ARTIFACT_LOCATION="https://download.ledgersmb.org/f/$LSMB_DL_DIR/$LSMB_VERSI
|
|||||||
|
|
||||||
# Installing psql client directly from instructions at https://wiki.postgresql.org/wiki/Apt
|
# 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
|
# That mitigates issues where the PG instance is running a newer version than this container
|
||||||
|
# Install Locale::Codes Locale::Country Locale::Language from CPAN to suppress
|
||||||
|
# deprecation-as-core-module warning
|
||||||
|
|
||||||
|
|
||||||
COPY --from=builder /srv/derived-deps /tmp/derived-deps
|
COPY --from=builder /srv/derived-deps /tmp/derived-deps
|
||||||
@@ -84,15 +86,16 @@ RUN set -x ; \
|
|||||||
texlive-plain-generic texlive-latex-recommended texlive-fonts-recommended \
|
texlive-plain-generic texlive-latex-recommended texlive-fonts-recommended \
|
||||||
texlive-xetex fonts-liberation \
|
texlive-xetex fonts-liberation \
|
||||||
lsb-release && \
|
lsb-release && \
|
||||||
echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
|
echo "deb [signed-by=/etc/apt/keyrings/postgresql.asc] 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 -) && \
|
mkdir -p /etc/apt/keyrings && \
|
||||||
|
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc > /etc/apt/keyrings/postgresql.asc && \
|
||||||
DEBIAN_FRONTEND="noninteractive" apt-get -y update && \
|
DEBIAN_FRONTEND="noninteractive" apt-get -y update && \
|
||||||
DEBIAN_FRONTEND="noninteractive" apt-get -y install postgresql-client && \
|
DEBIAN_FRONTEND="noninteractive" apt-get -y install postgresql-client && \
|
||||||
DEBIAN_FRONTEND="noninteractive" apt-get -q -y install git cpanminus make gcc libperl-dev && \
|
DEBIAN_FRONTEND="noninteractive" apt-get -q -y install git cpanminus make gcc libperl-dev && \
|
||||||
wget --quiet -O /tmp/ledgersmb-$LSMB_VERSION.tar.gz "$ARTIFACT_LOCATION" && \
|
wget --quiet -O /tmp/ledgersmb-$LSMB_VERSION.tar.gz "$ARTIFACT_LOCATION" && \
|
||||||
tar -xzf /tmp/ledgersmb-$LSMB_VERSION.tar.gz --directory /srv && \
|
tar -xzf /tmp/ledgersmb-$LSMB_VERSION.tar.gz --directory /srv && \
|
||||||
rm -f /tmp/ledgersmb-$LSMB_VERSION.tar.gz && \
|
rm -f /tmp/ledgersmb-$LSMB_VERSION.tar.gz && \
|
||||||
cpanm --notest \
|
cpanm --metacpan --notest \
|
||||||
--with-feature=starman \
|
--with-feature=starman \
|
||||||
--with-feature=latex-pdf-ps \
|
--with-feature=latex-pdf-ps \
|
||||||
--with-feature=openoffice \
|
--with-feature=openoffice \
|
||||||
|
46
README.md
46
README.md
@@ -4,8 +4,9 @@ Dockerfile for LedgerSMB Docker image
|
|||||||
|
|
||||||
# Supported tags
|
# Supported tags
|
||||||
|
|
||||||
- `1.10`, `1.10.x`, `latest` - Latest official release from the 1.10 branch
|
- `1.11`, `1.11.x`, `latest` - Latest official release from the 1.11 branch
|
||||||
- `1.9`, `1.9.x` - Latest official release from the 1.9 branch
|
- `1.10`, `1.10.x` - Latest official release from the 1.10 branch
|
||||||
|
- `1.9`, `1.9.30` - Last official release from the 1.9 branch (End-of-Life)
|
||||||
- `1.8`, `1.8.31` - Last official release from the 1.8 branch (End-of-Life)
|
- `1.8`, `1.8.31` - Last official release from the 1.8 branch (End-of-Life)
|
||||||
- `1.7`, `1.7.41` - Last official release from the 1.7 branch (End-of-Life)
|
- `1.7`, `1.7.41` - Last official release from the 1.7 branch (End-of-Life)
|
||||||
- `1.6`, `1.6.33` - Last official release from the 1.6 branch (End-of-Life)
|
- `1.6`, `1.6.33` - Last official release from the 1.6 branch (End-of-Life)
|
||||||
@@ -202,47 +203,6 @@ The following parameters are now supported to set mail preferences:
|
|||||||
|
|
||||||
# Advanced setup
|
# Advanced setup
|
||||||
|
|
||||||
## Changing configuration
|
|
||||||
|
|
||||||
The configuration file is stored in /srv/ledgersmb/local/conf/. By mounting
|
|
||||||
that directory using a bind-mount to a location outside the container,
|
|
||||||
configuration can be changed between container starts:
|
|
||||||
|
|
||||||
```plain
|
|
||||||
$ docker run -d -p 5762:5762 --name myledger \
|
|
||||||
--mount 'type=bind,src=/home/ledgersmb/conf,dst=/srv/ledgersmb/local/conf \
|
|
||||||
-e POSTGRES_HOST=<ip/hostname> ledgersmb/ledgersmb:latest
|
|
||||||
```
|
|
||||||
|
|
||||||
## Overriding or adding configuration
|
|
||||||
|
|
||||||
By pre-creating a configuration file in the mounted configuration directory,
|
|
||||||
the standard configuration generation process in the container can be overruled:
|
|
||||||
|
|
||||||
```plain
|
|
||||||
$ cat <<EOF > /home/ledgersmb/conf/ledgersmb.yaml
|
|
||||||
... YOUR CONFIG HERE ...
|
|
||||||
EOF
|
|
||||||
$ docker run -d -p 5762:5762 --name myledger \
|
|
||||||
--mount 'type=bind,src=/home/ledgersmb/conf,dst=/srv/ledgersmb/local/conf \
|
|
||||||
-e POSTGRES_HOST=<ip/hostname> ledgersmb/ledgersmb:latest
|
|
||||||
```
|
|
||||||
|
|
||||||
If you do not want to completely overrule the configuration generated, but instead
|
|
||||||
supplement the configuration, you can put incremental configuration snippets in
|
|
||||||
files named `ledgersmb.XXX.yaml` in the same folder. E.g.:
|
|
||||||
|
|
||||||
```plain
|
|
||||||
$ cat <<EOF > /home/ledgersmb/conf/ledgersmb.001.yaml
|
|
||||||
logging:
|
|
||||||
file: ledgersmb.logging
|
|
||||||
EOF
|
|
||||||
```
|
|
||||||
|
|
||||||
[Documentation with respect to the available configuration
|
|
||||||
keys](https://github.com/ledgersmb/LedgerSMB/blob/master/doc/conf/ledgersmb.yaml)
|
|
||||||
is available in the LedgerSMB repository.
|
|
||||||
|
|
||||||
## Docker Compose with reverse proxy
|
## Docker Compose with reverse proxy
|
||||||
|
|
||||||
The `docker-compose-reverseproxy.yml` file shows a docker-compose setup
|
The `docker-compose-reverseproxy.yml` file shows a docker-compose setup
|
||||||
|
@@ -16,7 +16,7 @@ services:
|
|||||||
# because that allows us to use the default hostname ("postgres")
|
# because that allows us to use the default hostname ("postgres")
|
||||||
# from the LedgerSMB configuration
|
# from the LedgerSMB configuration
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:15-alpine
|
image: postgres:12-alpine
|
||||||
environment:
|
environment:
|
||||||
# Replace the password below for a secure setup
|
# Replace the password below for a secure setup
|
||||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-abc}
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-abc}
|
||||||
@@ -32,14 +32,6 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
image: ghcr.io/ledgersmb/ledgersmb:1.10
|
image: ghcr.io/ledgersmb/ledgersmb:1.10
|
||||||
volumes:
|
|
||||||
# In order to store the configuration outside the image, allowing it to
|
|
||||||
# be edited between container restarts, uncomment the section below and
|
|
||||||
# change the 'source' to the directory where you want the configuration
|
|
||||||
# to be stored.
|
|
||||||
# - type: bind
|
|
||||||
# - source: /home/ledgersmb/conf
|
|
||||||
# - target: /srv/ledgersmb/local/conf
|
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
- default
|
- default
|
||||||
|
73
start.sh
73
start.sh
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
cd /srv/ledgersmb
|
cd /srv/ledgersmb
|
||||||
mkdir ./local/conf/
|
|
||||||
if [[ -n "$SSMTP_ROOT" ]]; then
|
if [[ -n "$SSMTP_ROOT" ]]; then
|
||||||
echo "\$SSMTP_ROOT set; parameter is deprecated and will be ignored"
|
echo "\$SSMTP_ROOT set; parameter is deprecated and will be ignored"
|
||||||
LSMB_HAVE_DEPRECATED=1
|
LSMB_HAVE_DEPRECATED=1
|
||||||
@@ -68,58 +68,27 @@ if [[ -n "$LSMB_HAVE_DEPRECATED" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [[ ! -f ./local/conf/ledgersmb.yaml ]]; then
|
if [[ ! -f ledgersmb.conf ]]; then
|
||||||
cat <<EOF >./local/conf/ledgersmb.yaml
|
cat <<EOF >/tmp/ledgersmb.conf
|
||||||
paths:
|
[main]
|
||||||
$class: Beam::Wire
|
cache_templates = 1
|
||||||
config:
|
[database]
|
||||||
UI: ./UI/
|
host = $POSTGRES_HOST
|
||||||
UI_cache: lsmb_templates/
|
port = $POSTGRES_PORT
|
||||||
|
default_db = $DEFAULT_DB
|
||||||
db:
|
[mail]
|
||||||
$class: LedgerSMB::Database::Factory
|
${LSMB_MAIL_SMTPHOST:+smtphost=$LSMB_MAIL_SMTPHOST
|
||||||
connect_data:
|
}${LSMB_MAIL_SMTPPORT:+smtpport=$LSMB_MAIL_SMTPPORT
|
||||||
host: $POSTGRES_HOST
|
}${LSMB_MAIL_SMTPSENDER_HOSTNAME:+smtpsender_hostname=$LSMB_MAIL_SMTPSENDER_HOSTNAME
|
||||||
port: $POSTGRES_PORT
|
}${LSMB_MAIL_SMTPTLS:+smtptls=$LSMB_MAIL_SMTPTLS
|
||||||
|
}${LSMB_MAIL_SMTPUSER:+smtpuser=$LSMB_MAIL_SMTPUSER
|
||||||
mail:
|
}${LSMB_MAIL_SMTPPASS:+smtppass=$LSMB_MAIL_SMTPPASS
|
||||||
transport:
|
}${LSMB_MAIL_SMTPAUTHMECH:+smtpauthmech=$LSMB_MAIL_SMTPAUTHMECH
|
||||||
$class: LedgerSMB::Mailer::TransportSMTP
|
}
|
||||||
host: $LSMB_MAIL_SMTPHOST
|
[proxy]
|
||||||
port: $LSMB_MAIL_SMTPPORT
|
ip=${PROXY_IP:-172.17.0.1/12}
|
||||||
helo: $LSMB_MAIL_SMTPSENDER_HOSTNAME
|
|
||||||
tls: $LSMB_MAIL_SMTPTLS
|
|
||||||
|
|
||||||
miscellaneous:
|
|
||||||
$class: Beam::Wire
|
|
||||||
config:
|
|
||||||
proxy_ip: ${PROXY_IP:-172.17.0.1/12}
|
|
||||||
|
|
||||||
ui:
|
|
||||||
class: LedgerSMB::Template::UI
|
|
||||||
method: new_UI
|
|
||||||
lifecycle: eager
|
|
||||||
args:
|
|
||||||
cache:
|
|
||||||
$ref: paths/UI_cache
|
|
||||||
root:
|
|
||||||
$ref: paths/UI
|
|
||||||
EOF
|
EOF
|
||||||
|
export LSMB_CONFIG_FILE='/tmp/ledgersmb.conf'
|
||||||
if [[ -n "" ]]
|
|
||||||
then
|
|
||||||
cat <<EOF >./local/conf/ledgersmb.000.yaml
|
|
||||||
mail:
|
|
||||||
transport:
|
|
||||||
sasl_password: ''
|
|
||||||
sasl_username:
|
|
||||||
$class: Authen::SASL
|
|
||||||
mechanism: $LSMB_MAIL_SMTPAUTHMECH
|
|
||||||
callback:
|
|
||||||
user: $LSMB_MAIL_SMTPUSER
|
|
||||||
pass: $LSMB_MAIL_SMTPPASS
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# start ledgersmb
|
# start ledgersmb
|
||||||
|
Reference in New Issue
Block a user