Git Product home page Git Product logo

idempiere-docker's Introduction

idemp-docker

TeamCity build status

The Banda version of iDempiere docker to use our specific files and for testing.

How to Use

Any files to be used by the container should be placed in the ./src directory.

iDempiere Installer File

An iDempiere tar file is needed to install iDempiere in the container. You can fetch this file from the BandaHealth build for iDempiere, a downloadable from the iDempiere website, or you can build one yourself. If you want to build one, do the following:

  1. Navigate to your iDempiere local repository.
  2. Run
mvn verify
  1. Navigate to the following directory:
[iDempiere directory]/org.idempiere.p2/target/products/org.adempiere.server.product/linux/gtk
  1. If on Windows, don't forget to convert the line endings by running
find ./ -name *.sh -exec dos2unix '{}' \;
  1. Compress and Zip the file (you can run the following command on Linux).
tar -zcvf idempiere.build.gtk.linux.x86_64.tar.gz x86_64

Put the file in the ./idempiere directory and ensure it's called:

idempiere.build.gtk.linux.x86_64.tar.gz

Initialization

DB Initialization

There are two choices for DB initialization:

  1. iDempiere Base DB
  2. A DB generated from a specified file.

To run any DB initialization, create a file called initial-db.dmp and put it in ./src. It should be generated using:

pg_dump -Fc --file=initial-db.dmp [DATABASE NAME]

You can use compression with the pg_dump command, if you wish.

At it's default, a new DB will only be initialized if one doesn't exist. To override this (which is useful for testing purposes) set the following environment variable:

IDEMPIERE_FRESH_DB=true

DB Migrations

Place all migrations, both script and 2-pack, in a ./src/migration directory (matching the structure of iDempiere's migration directory). Migrations will automatically be applied if no DB exists and no DB initialization script is provided when this stack is run.

If you wish DB script to be applied no matter when, you can use the environment variable:

MIGRATE_EXISTING_DATABASE=true

Plugins

Any plugins should go in a ./srce/plugin directory. These will be copied into the image and run with iDempiere.

Additionally, you can optionally create a ./src/bundles.info file matching the information at the bottom of the iDempiere plugin installation tutorial. Basically, put each plugin on it's own line and follow the following format:

${plugin_name},${plugin_version},${plugin_file},${start_level},${auto_start}

If you would like a bundles.info file auto-generated for you, you can set the environment variable:

GENERATE_PLUGIN_BUNDLE_INFO=true

Environment Configuration

See the .env.default file for examples of what should go into your own .env file. Some things to note are:

  • If you're running this locally, you may want to change the following ports to avoid conflicts with your local setup:
    • IDEMPIERE_PORT
    • POSTGRES_PORT
    • IDEMPIERE_SSL_PORT

Unit Testing

It is a good idea to make sure that the DB is created each time, so make use of the environment variable mentioned under DB Initialization above.

This image will load plugins, migration scripts, and reports, so feel free to include those in testing. Additionally, you can set up the container to not return healthy until all plugins have been resolved/started by setting the following environment variable:

HEALTHY_AFTER_PLUGINS_START=true

If using a Docker compose file, you can set the following in whichever service is dependent on the iDempiere service (e.g. a service to run tests against iDempiere):

services:
	idempiere:
		...
	
	service_needing_idempiere:
		...
		depends_on:
			idempiere:
				condition: service_healthy

idempiere-docker's People

Contributors

kwburnett avatar whiscard avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.