forked from idempiere/idempiere-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
409 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM openjdk:11-jdk | ||
|
||
LABEL maintainer="www.ingeint.com" | ||
|
||
ENV IDEMPIERE_VERSION 10 | ||
ENV IDEMPIERE_HOME /opt/idempiere | ||
ENV IDEMPIERE_PLUGINS_HOME $IDEMPIERE_HOME/plugins | ||
ENV IDEMPIERE_LOGS_HOME $IDEMPIERE_HOME/log | ||
ENV IDEMPIERE_BUILD https://sourceforge.net/projects/idempiere/files/v10/server/idempiereServer10.gtk.linux.x86_64.zip | ||
|
||
|
||
WORKDIR $IDEMPIERE_HOME | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends nano postgresql-client && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN wget --no-check-certificate $IDEMPIERE_BUILD -O /tmp/idempiere-server.zip && \ | ||
echo "Hash: $(md5sum /tmp/idempiere-server.zip)" > $IDEMPIERE_HOME/MD5SUMS && \ | ||
echo "Date: $(date)" >> $IDEMPIERE_HOME/MD5SUMS && \ | ||
unzip -q -o /tmp/idempiere-server.zip -d /tmp && \ | ||
mv /tmp/idempiere.gtk.linux.x86_64/idempiere-server/* $IDEMPIERE_HOME && \ | ||
rm -rf /tmp/idempiere* | ||
RUN cat $IDEMPIERE_HOME/MD5SUMS | ||
RUN ln -s $IDEMPIERE_HOME/idempiere-server.sh /usr/bin/idempiere | ||
|
||
COPY docker-entrypoint.sh $IDEMPIERE_HOME | ||
RUN chown -R root:root $IDEMPIERE_HOME | ||
|
||
ENTRYPOINT ["./docker-entrypoint.sh"] | ||
CMD ["idempiere"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -Eeo pipefail | ||
|
||
echo "iDempiere Docker Documentation https://github.com/idempiere/idempiere-docker" | ||
cat $IDEMPIERE_HOME/MD5SUMS | ||
|
||
JAVA_OPTIONS=${JAVA_OPTIONS:-${JAVA_OPTIONS:[]}} | ||
KEY_STORE_PASS=${KEY_STORE_PASS:-myPassword} | ||
KEY_STORE_ON=${KEY_STORE_ON:-idempiere.org} | ||
KEY_STORE_OU=${KEY_STORE_OU:-iDempiere Docker} | ||
KEY_STORE_O=${KEY_STORE_O:-iDempiere} | ||
KEY_STORE_L=${KEY_STORE_L:-myTown} | ||
KEY_STORE_S=${KEY_STORE_S:-CA} | ||
KEY_STORE_C=${KEY_STORE_C:-US} | ||
HOST=${HOST:-0.0.0.0} | ||
IDEMPIERE_PORT=${IDEMPIERE_PORT:-8080} | ||
IDEMPIERE_SSL_PORT=${IDEMPIERE_SSL_PORT:-8443} | ||
TELNET_PORT=${TELNET_PORT:-12612} | ||
DB_HOST=${DB_HOST:-postgres} | ||
DB_PORT=${DB_PORT:-5432} | ||
DB_NAME=${DB_NAME:-idempiere} | ||
DB_USER=${DB_USER:-adempiere} | ||
DB_PASS=${DB_PASS:-adempiere} | ||
DB_ADMIN_PASS=${DB_ADMIN_PASS:-postgres} | ||
MAIL_HOST=${MAIL_HOST:-0.0.0.0} | ||
MAIL_USER=${MAIL_USER:-info} | ||
MAIL_PASS=${MAIL_PASS:-info} | ||
MAIL_ADMIN=${MAIL_ADMIN:-info@idempiere} | ||
MIGRATE_EXISTING_DATABASE=${MIGRATE_EXISTING_DATABASE:false} | ||
|
||
if [[ -n "$DB_PASS_FILE" ]]; then | ||
echo "DB_PASS_FILE set as $DB_PASS_FILE..." | ||
DB_PASS=$(cat $DB_PASS_FILE) | ||
fi | ||
|
||
if [[ -n "$DB_ADMIN_PASS_FILE" ]]; then | ||
echo "DB_ADMIN_PASS_FILE set as $DB_ADMIN_PASS_FILE..." | ||
DB_ADMIN_PASS=$(cat $DB_ADMIN_PASS_FILE) | ||
fi | ||
|
||
if [[ -n "$MAIL_PASS_FILE" ]]; then | ||
echo "MAIL_PASS_FILE set as $MAIL_PASS_FILE..." | ||
MAIL_PASS=$(cat $MAIL_PASS_FILE) | ||
fi | ||
|
||
if [[ -n "$KEY_STORE_PASS_FILE" ]]; then | ||
echo "KEY_STORE_PASS_FILE set as $KEY_STORE_PASS_FILE..." | ||
KEY_STORE_PASS=$(cat $KEY_STORE_PASS_FILE) | ||
fi | ||
|
||
if [[ "$1" == "idempiere" ]]; then | ||
RETRIES=30 | ||
|
||
until PGPASSWORD=$DB_ADMIN_PASS psql -h $DB_HOST -U postgres -c "\q" > /dev/null 2>&1 || [[ $RETRIES == 0 ]]; do | ||
echo "Waiting for postgres server, $((RETRIES--)) remaining attempts..." | ||
sleep 1 | ||
done | ||
|
||
if [[ $RETRIES == 0 ]]; then | ||
echo "Shutting down..." | ||
exit 1 | ||
fi | ||
|
||
echo "Removing default settings..." | ||
rm -f idempiereEnv.properties jettyhome/etc/keystore | ||
|
||
echo "Executing console-setup..." | ||
echo -e "$JAVA_HOME\n$JAVA_OPTIONS\n$IDEMPIERE_HOME\n$KEY_STORE_PASS\n$KEY_STORE_ON\n$KEY_STORE_OU\n$KEY_STORE_O\n$KEY_STORE_L\n$KEY_STORE_S\n$KEY_STORE_C\n$HOST\n$IDEMPIERE_PORT\n$IDEMPIERE_SSL_PORT\nN\n2\n$DB_HOST\n$DB_PORT\n$DB_NAME\n$DB_USER\n$DB_PASS\n$DB_ADMIN_PASS\n$MAIL_HOST\n$MAIL_USER\n$MAIL_PASS\n$MAIL_ADMIN\nY\n" | ./console-setup.sh | ||
|
||
if ! PGPASSWORD=$DB_PASS psql -h $DB_HOST -U $DB_USER -d $DB_NAME -c "\q" > /dev/null 2>&1 ; then | ||
cd utils | ||
echo "Database '$DB_NAME' not found, starting import..." | ||
./RUN_ImportIdempiere.sh | ||
echo "Synchronizing database..." | ||
./RUN_SyncDB.sh | ||
cd .. | ||
echo "Signing database..." | ||
./sign-database-build.sh | ||
else | ||
echo "Database '$DB_NAME' is found..." | ||
if [[ "$MIGRATE_EXISTING_DATABASE" == "true" ]]; then | ||
cd utils | ||
echo "MIGRATE_EXISTING_DATABASE is equal to 'true'. Synchronizing database..." | ||
./RUN_SyncDB.sh | ||
cd .. | ||
echo "Signing database..." | ||
./sign-database-build.sh | ||
else | ||
echo "MIGRATE_EXISTING_DATABASE is equal to 'false'. Skipping..." | ||
fi | ||
fi | ||
fi | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM ubuntu:22.04 | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
ENV IDEMPIERE_VERSION 11 | ||
ENV IDEMPIERE_HOME /opt/idempiere | ||
ENV IDEMPIERE_PLUGINS_HOME $IDEMPIERE_HOME/plugins | ||
ENV IDEMPIERE_LOGS_HOME $IDEMPIERE_HOME/log | ||
ENV IDEMPIERE_BUILD https://sourceforge.net/projects/idempiere/files/v11/server/idempiereServer11.gtk.linux.x86_64.zip | ||
|
||
WORKDIR $IDEMPIERE_HOME | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends nano postgresql-client openjdk-17-jdk wget unzip && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN wget --no-check-certificate $IDEMPIERE_BUILD -O /tmp/idempiere-server.zip && \ | ||
echo "Hash: $(md5sum /tmp/idempiere-server.zip)" > $IDEMPIERE_HOME/MD5SUMS && \ | ||
echo "Date: $(date)" >> $IDEMPIERE_HOME/MD5SUMS && \ | ||
unzip -q -o /tmp/idempiere-server.zip -d /tmp && \ | ||
mv /tmp/idempiere.gtk.linux.x86_64/idempiere-server/* $IDEMPIERE_HOME && \ | ||
rm -rf /tmp/idempiere* | ||
RUN cat $IDEMPIERE_HOME/MD5SUMS | ||
RUN ln -s $IDEMPIERE_HOME/idempiere-server.sh /usr/bin/idempiere | ||
|
||
COPY docker-entrypoint.sh $IDEMPIERE_HOME | ||
|
||
ENTRYPOINT ["./docker-entrypoint.sh"] | ||
CMD ["idempiere"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -Eeo pipefail | ||
|
||
echo "iDempiere Docker Documentation https://github.com/idempiere/idempiere-docker" | ||
cat $IDEMPIERE_HOME/MD5SUMS | ||
|
||
JAVA_OPTIONS=${JAVA_OPTIONS:-${JAVA_OPTIONS:[]}} | ||
KEY_STORE_PASS=${KEY_STORE_PASS:-myPassword} | ||
KEY_STORE_ON=${KEY_STORE_ON:-idempiere.org} | ||
KEY_STORE_OU=${KEY_STORE_OU:-iDempiere Docker} | ||
KEY_STORE_O=${KEY_STORE_O:-iDempiere} | ||
KEY_STORE_L=${KEY_STORE_L:-myTown} | ||
KEY_STORE_S=${KEY_STORE_S:-CA} | ||
KEY_STORE_C=${KEY_STORE_C:-US} | ||
HOST=${HOST:-0.0.0.0} | ||
IDEMPIERE_PORT=${IDEMPIERE_PORT:-8080} | ||
IDEMPIERE_SSL_PORT=${IDEMPIERE_SSL_PORT:-8443} | ||
TELNET_PORT=${TELNET_PORT:-12612} | ||
DB_HOST=${DB_HOST:-postgres} | ||
DB_PORT=${DB_PORT:-5432} | ||
DB_NAME=${DB_NAME:-idempiere} | ||
DB_USER=${DB_USER:-adempiere} | ||
DB_PASS=${DB_PASS:-adempiere} | ||
DB_ADMIN_PASS=${DB_ADMIN_PASS:-postgres} | ||
MAIL_HOST=${MAIL_HOST:-0.0.0.0} | ||
MAIL_USER=${MAIL_USER:-info} | ||
MAIL_PASS=${MAIL_PASS:-info} | ||
MAIL_ADMIN=${MAIL_ADMIN:-info@idempiere} | ||
MIGRATE_EXISTING_DATABASE=${MIGRATE_EXISTING_DATABASE:false} | ||
|
||
if [[ -n "$DB_PASS_FILE" ]]; then | ||
echo "DB_PASS_FILE set as $DB_PASS_FILE..." | ||
DB_PASS=$(cat $DB_PASS_FILE) | ||
fi | ||
|
||
if [[ -n "$DB_ADMIN_PASS_FILE" ]]; then | ||
echo "DB_ADMIN_PASS_FILE set as $DB_ADMIN_PASS_FILE..." | ||
DB_ADMIN_PASS=$(cat $DB_ADMIN_PASS_FILE) | ||
fi | ||
|
||
if [[ -n "$MAIL_PASS_FILE" ]]; then | ||
echo "MAIL_PASS_FILE set as $MAIL_PASS_FILE..." | ||
MAIL_PASS=$(cat $MAIL_PASS_FILE) | ||
fi | ||
|
||
if [[ -n "$KEY_STORE_PASS_FILE" ]]; then | ||
echo "KEY_STORE_PASS_FILE set as $KEY_STORE_PASS_FILE..." | ||
KEY_STORE_PASS=$(cat $KEY_STORE_PASS_FILE) | ||
fi | ||
|
||
if [[ "$1" == "idempiere" ]]; then | ||
RETRIES=30 | ||
|
||
until PGPASSWORD=$DB_ADMIN_PASS psql -h $DB_HOST -U postgres -c "\q" > /dev/null 2>&1 || [[ $RETRIES == 0 ]]; do | ||
echo "Waiting for postgres server, $((RETRIES--)) remaining attempts..." | ||
sleep 1 | ||
done | ||
|
||
if [[ $RETRIES == 0 ]]; then | ||
echo "Shutting down..." | ||
exit 1 | ||
fi | ||
|
||
echo "Removing default settings..." | ||
rm -f idempiereEnv.properties jettyhome/etc/keystore | ||
|
||
echo "Executing console-setup..." | ||
echo -e "$JAVA_HOME\n$JAVA_OPTIONS\n$IDEMPIERE_HOME\n$KEY_STORE_PASS\n$KEY_STORE_ON\n$KEY_STORE_OU\n$KEY_STORE_O\n$KEY_STORE_L\n$KEY_STORE_S\n$KEY_STORE_C\n$HOST\n$IDEMPIERE_PORT\n$IDEMPIERE_SSL_PORT\nN\n2\n$DB_HOST\n$DB_PORT\n$DB_NAME\n$DB_USER\n$DB_PASS\n$DB_ADMIN_PASS\n$MAIL_HOST\n$MAIL_USER\n$MAIL_PASS\n$MAIL_ADMIN\nY\n" | ./console-setup.sh | ||
|
||
if ! PGPASSWORD=$DB_PASS psql -h $DB_HOST -U $DB_USER -d $DB_NAME -c "\q" > /dev/null 2>&1 ; then | ||
cd utils | ||
echo "Database '$DB_NAME' not found, starting import..." | ||
./RUN_ImportIdempiere.sh | ||
echo "Synchronizing database..." | ||
./RUN_SyncDB.sh | ||
cd .. | ||
echo "Signing database..." | ||
./sign-database-build.sh | ||
else | ||
echo "Database '$DB_NAME' is found..." | ||
if [[ "$MIGRATE_EXISTING_DATABASE" == "true" ]]; then | ||
cd utils | ||
echo "MIGRATE_EXISTING_DATABASE is equal to 'true'. Synchronizing database..." | ||
./RUN_SyncDB.sh | ||
cd .. | ||
echo "Signing database..." | ||
./sign-database-build.sh | ||
else | ||
echo "MIGRATE_EXISTING_DATABASE is equal to 'false'. Skipping..." | ||
fi | ||
fi | ||
fi | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM ubuntu:22.04 | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
ENV IDEMPIERE_VERSION 11 | ||
ENV IDEMPIERE_HOME /opt/idempiere | ||
ENV IDEMPIERE_PLUGINS_HOME $IDEMPIERE_HOME/plugins | ||
ENV IDEMPIERE_LOGS_HOME $IDEMPIERE_HOME/log | ||
ENV IDEMPIERE_BUILD https://sourceforge.net/projects/idempiere/files/v11/daily-server/idempiereServer11Daily.gtk.linux.x86_64.zip | ||
|
||
WORKDIR $IDEMPIERE_HOME | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends nano postgresql-client openjdk-17-jdk wget unzip && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN wget --no-check-certificate $IDEMPIERE_BUILD -O /tmp/idempiere-server.zip && \ | ||
echo "Hash: $(md5sum /tmp/idempiere-server.zip)" > $IDEMPIERE_HOME/MD5SUMS && \ | ||
echo "Date: $(date)" >> $IDEMPIERE_HOME/MD5SUMS && \ | ||
unzip -q -o /tmp/idempiere-server.zip -d /tmp && \ | ||
mv /tmp/idempiere.gtk.linux.x86_64/idempiere-server/* $IDEMPIERE_HOME && \ | ||
rm -rf /tmp/idempiere* | ||
RUN cat $IDEMPIERE_HOME/MD5SUMS | ||
RUN ln -s $IDEMPIERE_HOME/idempiere-server.sh /usr/bin/idempiere | ||
|
||
COPY docker-entrypoint.sh $IDEMPIERE_HOME | ||
|
||
ENTRYPOINT ["./docker-entrypoint.sh"] | ||
CMD ["idempiere"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -Eeo pipefail | ||
|
||
echo "iDempiere Docker Documentation https://github.com/idempiere/idempiere-docker" | ||
cat $IDEMPIERE_HOME/MD5SUMS | ||
|
||
JAVA_OPTIONS=${JAVA_OPTIONS:-${JAVA_OPTIONS:[]}} | ||
KEY_STORE_PASS=${KEY_STORE_PASS:-myPassword} | ||
KEY_STORE_ON=${KEY_STORE_ON:-idempiere.org} | ||
KEY_STORE_OU=${KEY_STORE_OU:-iDempiere Docker} | ||
KEY_STORE_O=${KEY_STORE_O:-iDempiere} | ||
KEY_STORE_L=${KEY_STORE_L:-myTown} | ||
KEY_STORE_S=${KEY_STORE_S:-CA} | ||
KEY_STORE_C=${KEY_STORE_C:-US} | ||
HOST=${HOST:-0.0.0.0} | ||
IDEMPIERE_PORT=${IDEMPIERE_PORT:-8080} | ||
IDEMPIERE_SSL_PORT=${IDEMPIERE_SSL_PORT:-8443} | ||
TELNET_PORT=${TELNET_PORT:-12612} | ||
DB_HOST=${DB_HOST:-postgres} | ||
DB_PORT=${DB_PORT:-5432} | ||
DB_NAME=${DB_NAME:-idempiere} | ||
DB_USER=${DB_USER:-adempiere} | ||
DB_PASS=${DB_PASS:-adempiere} | ||
DB_ADMIN_PASS=${DB_ADMIN_PASS:-postgres} | ||
MAIL_HOST=${MAIL_HOST:-0.0.0.0} | ||
MAIL_USER=${MAIL_USER:-info} | ||
MAIL_PASS=${MAIL_PASS:-info} | ||
MAIL_ADMIN=${MAIL_ADMIN:-info@idempiere} | ||
MIGRATE_EXISTING_DATABASE=${MIGRATE_EXISTING_DATABASE:false} | ||
|
||
if [[ -n "$DB_PASS_FILE" ]]; then | ||
echo "DB_PASS_FILE set as $DB_PASS_FILE..." | ||
DB_PASS=$(cat $DB_PASS_FILE) | ||
fi | ||
|
||
if [[ -n "$DB_ADMIN_PASS_FILE" ]]; then | ||
echo "DB_ADMIN_PASS_FILE set as $DB_ADMIN_PASS_FILE..." | ||
DB_ADMIN_PASS=$(cat $DB_ADMIN_PASS_FILE) | ||
fi | ||
|
||
if [[ -n "$MAIL_PASS_FILE" ]]; then | ||
echo "MAIL_PASS_FILE set as $MAIL_PASS_FILE..." | ||
MAIL_PASS=$(cat $MAIL_PASS_FILE) | ||
fi | ||
|
||
if [[ -n "$KEY_STORE_PASS_FILE" ]]; then | ||
echo "KEY_STORE_PASS_FILE set as $KEY_STORE_PASS_FILE..." | ||
KEY_STORE_PASS=$(cat $KEY_STORE_PASS_FILE) | ||
fi | ||
|
||
if [[ "$1" == "idempiere" ]]; then | ||
RETRIES=30 | ||
|
||
until PGPASSWORD=$DB_ADMIN_PASS psql -h $DB_HOST -U postgres -c "\q" > /dev/null 2>&1 || [[ $RETRIES == 0 ]]; do | ||
echo "Waiting for postgres server, $((RETRIES--)) remaining attempts..." | ||
sleep 1 | ||
done | ||
|
||
if [[ $RETRIES == 0 ]]; then | ||
echo "Shutting down..." | ||
exit 1 | ||
fi | ||
|
||
echo "Removing default settings..." | ||
rm -f idempiereEnv.properties jettyhome/etc/keystore | ||
|
||
echo "Executing console-setup..." | ||
echo -e "$JAVA_HOME\n$JAVA_OPTIONS\n$IDEMPIERE_HOME\n$KEY_STORE_PASS\n$KEY_STORE_ON\n$KEY_STORE_OU\n$KEY_STORE_O\n$KEY_STORE_L\n$KEY_STORE_S\n$KEY_STORE_C\n$HOST\n$IDEMPIERE_PORT\n$IDEMPIERE_SSL_PORT\nN\n2\n$DB_HOST\n$DB_PORT\n$DB_NAME\n$DB_USER\n$DB_PASS\n$DB_ADMIN_PASS\n$MAIL_HOST\n$MAIL_USER\n$MAIL_PASS\n$MAIL_ADMIN\nY\n" | ./console-setup.sh | ||
|
||
if ! PGPASSWORD=$DB_PASS psql -h $DB_HOST -U $DB_USER -d $DB_NAME -c "\q" > /dev/null 2>&1 ; then | ||
cd utils | ||
echo "Database '$DB_NAME' not found, starting import..." | ||
./RUN_ImportIdempiere.sh | ||
echo "Synchronizing database..." | ||
./RUN_SyncDB.sh | ||
cd .. | ||
echo "Signing database..." | ||
./sign-database-build.sh | ||
else | ||
echo "Database '$DB_NAME' is found..." | ||
if [[ "$MIGRATE_EXISTING_DATABASE" == "true" ]]; then | ||
cd utils | ||
echo "MIGRATE_EXISTING_DATABASE is equal to 'true'. Synchronizing database..." | ||
./RUN_SyncDB.sh | ||
cd .. | ||
echo "Signing database..." | ||
./sign-database-build.sh | ||
else | ||
echo "MIGRATE_EXISTING_DATABASE is equal to 'false'. Skipping..." | ||
fi | ||
fi | ||
fi | ||
|
||
exec "$@" |
Oops, something went wrong.