-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from itsmng/fix_for_kubernetes
Fix for kubernetes
- Loading branch information
Showing
17 changed files
with
102 additions
and
127 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,17 @@ | ||
FROM ghcr.io/itsmng/itsm-ng:latest-cron | ||
|
||
ARG REPO="itsmng" | ||
ARG VERSION | ||
|
||
RUN apt update &&\ | ||
apt install wget -y && \ | ||
cd /var/www && \ | ||
wget -q "https://github.com/$REPO/itsm-ng/releases/download/v$VERSION/itsm-ng-v$VERSION.tgz" && \ | ||
tar -xf itsm-ng-v${VERSION}.tgz && \ | ||
rm -rf itsm-ng-v${VERSION}.tgz | ||
|
||
COPY ./docker-entrypoint.sh /docker-entrypoint.sh | ||
COPY ./docker-entrypoint.d /docker-entrypoint.d | ||
|
||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
CMD exit |
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,7 @@ | ||
#!/bin/sh | ||
|
||
# Wait for MySQL to be ready | ||
until nc -z -v -w30 $MARIADB_HOST 3306; do | ||
echo "Waiting for MySQL connection..." | ||
sleep 2 | ||
done |
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,3 @@ | ||
#!/bin/sh | ||
|
||
php /var/www/itsm-ng/front/cron.php |
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,5 @@ | ||
#!/bin/sh | ||
|
||
if [ -f /var/www/itsm-ng/plugins/ocsinventoryng/scripts/run.php ]; then | ||
php /var/www/itsm-ng/plugins/ocsinventoryng/scripts/run.php | ||
fi |
File renamed without changes.
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,18 @@ | ||
#!/bin/sh | ||
|
||
if [ ! -d /var/www/itsm-ng/files/_cache ]; then | ||
mkdir -pv /var/www/itsm-ng/files/_cache \ | ||
/var/www/itsm-ng/files/_cron \ | ||
/var/www/itsm-ng/files/_dumps \ | ||
/var/www/itsm-ng/files/_graphs \ | ||
/var/www/itsm-ng/files/_lock \ | ||
/var/www/itsm-ng/files/_pictures \ | ||
/var/www/itsm-ng/files/_plugins \ | ||
/var/www/itsm-ng/files/_rss \ | ||
/var/www/itsm-ng/files/_sessions \ | ||
/var/www/itsm-ng/files/_tmp \ | ||
/var/www/itsm-ng/files/_uploads | ||
|
||
chown -R www-data:www-data /var/www/itsm-ng/files | ||
fi | ||
|
This file was deleted.
Oops, something went wrong.
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,13 @@ | ||
#!/bin/sh | ||
|
||
# Wait for MySQL to be ready | ||
until nc -z -v -w30 $MARIADB_HOST 3306; do | ||
echo "Waiting for MySQL connection..." | ||
sleep 2 | ||
done | ||
|
||
# Run the installation if config_db.php doesn't exist | ||
if [ ! -f /var/www/itsm-ng/config/config_db.php ]; then | ||
chmod -R 777 /var/www/itsm-ng/files/_sessions | ||
cd /var/www/itsm-ng && php bin/console itsmng:database:install -H $MARIADB_HOST -u $MARIADB_USER -p $MARIADB_PASSWORD -d $MARIADB_DATABASE -n | ||
fi |
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,12 @@ | ||
#!/bin/sh | ||
|
||
# Wait for MySQL to be ready | ||
until nc -z -v -w30 $MARIADB_HOST 3306; do | ||
echo "Waiting for MySQL connection..." | ||
sleep 2 | ||
done | ||
|
||
# Run the update if config_db.php exist | ||
if [ -f /var/www/itsm-ng/config/config_db.php ]; then | ||
cd /var/www/itsm-ng && php bin/console itsmng:database:update -n | ||
fi |
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,5 @@ | ||
#!/bin/sh | ||
|
||
if [ -f /var/www/itsm-ng/config/config_db.php ]; then | ||
chown -R www-data:www-data /var/www/itsm-ng/files | ||
fi |