-
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
1 changed file
with
28 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
echo "▶️ Plone OCI-Image entrypoint entered" | ||
|
||
echo "⚙️ fetch configuration from environment" | ||
/venv/bin/python /site/deployment/transform_from_environment.py -o $ZOPE_CONFIGURATION_FILE | ||
|
||
echo "⚙ generate instance from configuration" | ||
make zope-instance | ||
|
||
if [[ "$1" == "start" ]]; then | ||
echo "🌐 running Plone" | ||
make zope-start | ||
elif [[ "$1" == "export" ]]; then | ||
echo "📤 exporting to filestorage" | ||
/venv/bin/zodbconvert --clear /site/instance/etc/relstorage-export.conf | ||
elif [[ "$1" == "import" ]]; then | ||
echo "📥 importing from filestorage" | ||
/venv/bin/zodbconvert --clear /site/instance/etc/relstorage-import.conf | ||
elif [[ "$1" == "pack" ]]; then | ||
echo "🗜️ packing" | ||
/venv/bin/zodbpack /site/instance/etc/relstorage-pack.conf | ||
else | ||
echo "⌨️ execute custom command: $@" | ||
exec "$@" | ||
fi | ||
echo "⏏️ Exit Plone OCI-Image entrypoint." |