Compare commits

...

9 Commits

Author SHA1 Message Date
John Locke
d1ce52d26f 1.5.0-beta3 2016-01-02 22:46:29 -08:00
John Locke
2679a71a79 Fix grep flag 2015-11-19 12:00:43 -08:00
John Locke
11b9c43044 Patch from dcg: detect /etc/ssmtp.conf changes inside update script, instead of touching a /tmp file 2015-11-19 11:58:47 -08:00
John Locke
aa6a9d5b12 Set cpanm to quiet to prevent docker build from interpreting "1" as an error 2015-10-21 12:07:17 -07:00
John Locke
30a4f5ea91 Update readme for versions built 2015-08-01 10:11:44 -07:00
John Locke
2235f035a0 README improvements 2015-07-05 13:44:29 -07:00
John Locke
e20f3a1899 Switch Master branch to use perl:5 base image, and load necessary modules using cpanm 2015-07-05 11:34:01 -07:00
John Locke
07db28af99 Doc fixes 2015-07-05 09:07:43 -07:00
John Locke
2f7155e599 Make master branch track master upstream ledgersmb 2015-07-05 01:10:15 -07:00
4 changed files with 41 additions and 14 deletions

View File

@@ -1,11 +1,11 @@
FROM debian:jessie
FROM perl:5
MAINTAINER Freelock john@freelock.com
# Build time variables
ENV LSMB_VERSION 1.4
ENV LSMB_VERSION 1.5.0-beta3
# Install PHP5 and modules along with composer binary
# Install Perl, Tex, Starman, psql client, and all dependencies
RUN DEBIAN_FRONTENT=noninteractive && \
apt-get update && apt-get -y install \
git \
@@ -62,6 +62,24 @@ RUN chown www-data /etc/ssmtp /etc/ssmtp/ssmtp.conf && \
chmod +x /usr/bin/update_ssmtp.sh /usr/bin/start.sh && \
mkdir -p /var/www
# 1.5 requirements
RUN apt-get install -y \
libpgobject-perl \
libpgobject-simple-perl \
libpgobject-simple-role-perl \
libpgobject-util-dbmethod-perl
RUN cpanm -nq \
Carton PGObject::Type::BigFloat \
PGObject::Composite \
PGObject::Type::JSON \
PGObject::Type::Composite \
PGObject::Type::DateTime \
App::LedgerSMB::Admin
# 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
# Internal Port Expose
EXPOSE 5000
#USER www-data

View File

@@ -7,8 +7,7 @@ This is a work in progress to make a docker image for running LedgerSMB. It shou
- `1.5`, `dev-master` - Master branch, unstable
- `1.4`, `latest` - Tip of git 1.4 branch
- `1.4.12` - Latest stable release (not yet built)
- `1.3.45` - Last 1.3.x release (not yet built)
- `1.3` - Latest 1.3.x release
# What is LedgerSMB?
@@ -43,15 +42,17 @@ This image includes `EXPOSE 5432` (the postgres port), so standard container lin
Visit http://myledger:5000/setup.pl (you can forward port 5000 to the host machine, or lookup the IP address for the "myledger" container if running on localhost)
Log in with the "postgres" user and the password you set when starting up the Postgres container.
Log in with the "postgres" user and the password you set when starting up the Postgres container, and provide the name of a company database you want to create.
Once you have completed the setup, you have a fully functional LedgerSMB instance running!
## Updating the LedgerSMB container
Visit http://localhost:5000/login.pl to log in and get started.
# Updating the LedgerSMB container
No persistant data is stored in the LedgerSMB container. All LedgerSMB data is stored in Postgres, so you can stop/destroy/run a new LedgerSMB container, and as long as you link it to the Postgres database, you should be able to pick up where you left off.
## Environment Variables
# Environment Variables
The LedgerSMB image uses several environment variables which are easy to miss. While none of the variables are required, they may significantly aid you in using the image.
@@ -102,6 +103,10 @@ If you have any problems with or questions about this image or LedgerSMB, please
You can also reach some of the official LedgerSMB maintainers via the `#ledgersmb` IRC channel on [Freenode](https://freenode.net).
1.4/latest: CREATE_DATABASE env variable currently does not provision a test company.
1.5/dev-master: Currently no way to get a working database. Bugs are filed, blocking 3 different approaches: New database, Upgrade from 1.4, Test company
## Contributing
You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.

View File

@@ -1,11 +1,6 @@
#!/bin/bash
if [[ -e /tmp/smtpconfig ]]; then
echo "smtp configured."
else
update_ssmtp.sh
touch /tmp/smtpconfig
fi
if [[ ! -f ledgersmb.conf ]]; then
@@ -23,5 +18,8 @@ if [ ! -z ${CREATE_DATABASE+x} ]; then
--postgres_password "$POSTGRES_PASS"
fi
# Needed for modules loaded by cpanm
export PERL5LIB=/usr/local/lib/perl5/site_perl/5.22.0
# start ledgersmb
exec starman tools/starman.psgi

View File

@@ -1,4 +1,9 @@
#!/bin/bash
ConfiguredComment='# install script update_ssmtp.sh has configured ssmtp'
grep -qc "$ConfiguredComment" /etc/ssmtp.conf && {
echo "smtp configured."
exit
}
sed -i \
-e "s/\(root=\).*\$/\1$SSMTP_ROOT/g" \
@@ -10,3 +15,4 @@ sed -i \
[ -z "$SSMTP_AUTH_PASS" ] || echo "AuthPass=$SSMTP_AUTH_PASS" >> /etc/ssmtp/ssmtp.conf
[ -z "$SSMTP_AUTH_METHOD" ] || echo "AuthMethod=$SSMTP_AUTH_METHOD" >> /etc/ssmtp/ssmtp.conf
[ -z "$SSMTP_FROMLINE_OVERRIDE" ] || echo "FromLineOverride=$SSMTP_FROMLINE_OVERRIDE" >> /etc/ssmtp/ssmtp.conf
echo "$ConfiguredComment" >> /etc/ssmtp/ssmtp.conf