Skip to content

Commit

Permalink
add missing entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
jensens committed Jul 26, 2024
1 parent e222798 commit c1dbebe
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions backend/scripts/entrypoint.sh
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."

0 comments on commit c1dbebe

Please sign in to comment.