Updates for new dojo build requirements for 1.5/master

This commit is contained in:
John Locke 2016-05-29 22:32:31 -07:00
parent 867f5674f9
commit f070b9d6a6
3 changed files with 25 additions and 27 deletions

View File

@ -21,18 +21,22 @@ RUN DEBIAN_FRONTENT=noninteractive && \
postgresql-client-9.4 \ postgresql-client-9.4 \
ssmtp ssmtp
# Nodejs for doing Dojo build
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - && \
apt-get install -y nodejs
# Java is required for closure compiler in Dojo build
RUN DEBIAN_FRONTENT=noninteractive && apt-get install -y openjdk-7-jre
# Build time variables # Build time variables
ENV LSMB_VERSION 1.5.0-beta5 ENV LSMB_VERSION 1.5.0-beta-5
# Install LedgerSMB # Install LedgerSMB
RUN cd /srv && \ RUN cd /srv && \
git clone https://github.com/ledgersmb/LedgerSMB.git ledgersmb git clone --recursive -b master https://github.com/ledgersmb/LedgerSMB.git ledgersmb
WORKDIR /srv/ledgersmb WORKDIR /srv/ledgersmb
RUN git checkout master
#RUN git checkout $LSMB_VERSION
# 1.5 requirements # 1.5 requirements
RUN cpanm --quiet --notest \ RUN cpanm --quiet --notest \
--with-feature=starman \ --with-feature=starman \
@ -40,6 +44,8 @@ RUN cpanm --quiet --notest \
--with-feature=openoffice \ --with-feature=openoffice \
--installdeps . --installdeps .
# Build dojo
RUN make dojo
# Configure outgoing mail to use host, other run time variable defaults # Configure outgoing mail to use host, other run time variable defaults
@ -64,7 +70,7 @@ RUN chown www-data /etc/ssmtp /etc/ssmtp/ssmtp.conf && \
# Internal Port Expose # Internal Port Expose
EXPOSE 5000 EXPOSE 5762
#USER www-data #USER www-data
CMD ["start.sh"] CMD ["start.sh"]

View File

@ -5,9 +5,9 @@ This is a work in progress to make a docker image for running LedgerSMB. It shou
# Supported tags and respective `Dockerfile` links # Supported tags and respective `Dockerfile` links
- `1.5`, `dev-master` - Master branch, unstable - `dev-master` - Master branch from git, unstable
- `1.4`, `latest` - Tip of git 1.4 branch - `1.5`, `1.5.x` - Latest release tarball from 1.5 branch
- `1.3` - Latest 1.3.x release - `1.4`, `latest` - Latest tagged release of git 1.4 branch
# What is LedgerSMB? # What is LedgerSMB?
@ -18,7 +18,7 @@ The LedgerSMB project's priority is to provide an extremely capable yet user-fri
This Docker image is built to provide a self-contained LedgerSMB instance. To be functional, you need to connect it to a running Postgres installation. The official Postgres container will work as is, if you link it to the LedgerSMB instance at startup, or you can provide environment variables to an appropriate Postgres server. This Docker image is built to provide a self-contained LedgerSMB instance. To be functional, you need to connect it to a running Postgres installation. The official Postgres container will work as is, if you link it to the LedgerSMB instance at startup, or you can provide environment variables to an appropriate Postgres server.
LedgerSMB provides an http interface built on Starman out of the box, listening on port 5000. We do not recommend exposing this port, because we strongly recommend encrypting all connections using SSL/TLS. For production use, we recommend running a web server configured with SSL, such as Nginx or Apache, and proxying connections to LedgerSMB. LedgerSMB provides an http interface built on Starman out of the box, listening on port 5762. We do not recommend exposing this port, because we strongly recommend encrypting all connections using SSL/TLS. For production use, we recommend running a web server configured with SSL, such as Nginx or Apache, and proxying connections to LedgerSMB.
The other services you will need to put this in production are an SMTP gateway (set environment variables for SSMTP at container startup) and optionally a local print server (e.g. CUPS) installation. The print service is not currently supported in this Docker image, but pull requests are welcomed ;-) The other services you will need to put this in production are an SMTP gateway (set environment variables for SSMTP at container startup) and optionally a local print server (e.g. CUPS) installation. The print service is not currently supported in this Docker image, but pull requests are welcomed ;-)
@ -40,13 +40,13 @@ This image includes `EXPOSE 5432` (the postgres port), so standard container lin
## Set up LedgerSMB ## Set up LedgerSMB
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) Visit http://myledger:5762/setup.pl (you can forward port 5762 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, and provide the name of a company database you want to create. 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! Once you have completed the setup, you have a fully functional LedgerSMB instance running!
Visit http://localhost:5000/login.pl to log in and get started. Visit http://myledger:5762/login.pl to log in and get started.
# Updating the LedgerSMB container # Updating the LedgerSMB container
@ -68,12 +68,6 @@ These variables are used to set outgoing SMTP defaults. To set the outgoing emai
Use the other environment variables to relay mail through another host. Use the other environment variables to relay mail through another host.
### `CREATE_DATABASE` `POSTGRES_PASS`
If `CREATE_DATABASE` is set, the tools/dbsetup.pl is called with the database name, and the postgres host and password. Currently this is failing with 'Can't locate object method "process_roles" via package "LedgerSMB::Database" at tools/dbsetup.pl line 203.'
Once this is working, this will provision a new database in the existing server. After the first run, we recommend stopping/removing the LedgerSMB container and starting a new one without these variables -- the previous database should remain present.
# Troubleshooting/Developing # Troubleshooting/Developing
You can connect to a running container using: You can connect to a running container using:
@ -103,9 +97,6 @@ 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), or on the bridged [Matrix](https://matrix.org) room in [#ledgersmb:matrix.org](https://matrix.to/#/#ledgersmb:matrix.org). The [Vector.im](https://vector.im/beta/#/room/#ledgersmb:matrix.org) Matrix client is highly recommended. You can also reach some of the official LedgerSMB maintainers via the `#ledgersmb` IRC channel on [Freenode](https://freenode.net), or on the bridged [Matrix](https://matrix.org) room in [#ledgersmb:matrix.org](https://matrix.to/#/#ledgersmb:matrix.org). The [Vector.im](https://vector.im/beta/#/room/#ledgersmb:matrix.org) Matrix client is highly recommended.
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 ## Contributing

View File

@ -12,11 +12,12 @@ if [[ ! -f ledgersmb.conf ]]; then
/srv/ledgersmb/ledgersmb.conf /srv/ledgersmb/ledgersmb.conf
fi fi
if [ ! -z ${CREATE_DATABASE+x} ]; then # Currently unmaintained/untested
perl tools/dbsetup.pl --company $CREATE_DATABASE \ # if [ ! -z ${CREATE_DATABASE+x} ]; then
--host $POSTGRES_HOST \ # perl tools/dbsetup.pl --company $CREATE_DATABASE \
--postgres_password "$POSTGRES_PASS" # --host $POSTGRES_HOST \
fi # --postgres_password "$POSTGRES_PASS"
#fi
# Needed for modules loaded by cpanm # Needed for modules loaded by cpanm
export PERL5LIB export PERL5LIB
@ -29,4 +30,4 @@ done ;
echo "Selected PERL5LIB=$PERL5LIB"; echo "Selected PERL5LIB=$PERL5LIB";
# start ledgersmb # start ledgersmb
exec starman tools/starman.psgi exec starman --port 5762 tools/starman.psgi