mirror of
https://github.com/ledgersmb/ledgersmb-docker.git
synced 2025-04-19 06:37:11 -04:00
Add support for #4 - Make Postgres port configurable at run time
This commit is contained in:
parent
0034b44033
commit
293fd65da4
@ -33,6 +33,7 @@ RUN DEBIAN_FRONTENT=noninteractive && apt-get install -y openjdk-7-jre
|
|||||||
|
|
||||||
# Build time variables
|
# Build time variables
|
||||||
ENV LSMB_VERSION master
|
ENV LSMB_VERSION master
|
||||||
|
ARG CACHEBUST
|
||||||
|
|
||||||
# Install LedgerSMB
|
# Install LedgerSMB
|
||||||
RUN cd /srv && \
|
RUN cd /srv && \
|
||||||
@ -63,6 +64,8 @@ ENV SSMTP_FROMLINE_OVERRIDE YES
|
|||||||
#ENV SSMTP_AUTH_METHOD
|
#ENV SSMTP_AUTH_METHOD
|
||||||
|
|
||||||
ENV POSTGRES_HOST postgres
|
ENV POSTGRES_HOST postgres
|
||||||
|
ENV POSTGRES_PORT 5432
|
||||||
|
ENV DEFAULT_DB lsmb
|
||||||
|
|
||||||
COPY start.sh /usr/local/bin/start.sh
|
COPY start.sh /usr/local/bin/start.sh
|
||||||
COPY update_ssmtp.sh /usr/local/bin/update_ssmtp.sh
|
COPY update_ssmtp.sh /usr/local/bin/update_ssmtp.sh
|
||||||
|
@ -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.
|
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`
|
### `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.
|
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.
|
||||||
|
2
start.sh
2
start.sh
@ -8,6 +8,8 @@ if [[ ! -f ledgersmb.conf ]]; then
|
|||||||
sed -i \
|
sed -i \
|
||||||
-e "s/\(cache_templates = \).*\$/cache_templates = 1/g" \
|
-e "s/\(cache_templates = \).*\$/cache_templates = 1/g" \
|
||||||
-e "s/\(host = \).*\$/\1$POSTGRES_HOST/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/bin/ssmtp%g" \
|
-e "s%\(sendmail = \).*%\1/usr/bin/ssmtp%g" \
|
||||||
/srv/ledgersmb/ledgersmb.conf
|
/srv/ledgersmb/ledgersmb.conf
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user