Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9342124
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
View Options
diff --git a/docker/services/swh-storage/entrypoint.sh b/docker/services/swh-storage/entrypoint.sh
index e7974fc..cd86a78 100755
--- a/docker/services/swh-storage/entrypoint.sh
+++ b/docker/services/swh-storage/entrypoint.sh
@@ -1,50 +1,50 @@
#!/bin/bash
set -e
source /srv/softwareheritage/utils/pyutils.sh
setup_pip
if [ "$STORAGE_BACKEND" = "postgresql" ]; then
source /srv/softwareheritage/utils/pgsql.sh
setup_pgsql
elif [ "$STORAGE_BACKEND" = "cassandra" ]; then
echo Waiting for Cassandra to start
wait-for-it ${CASSANDRA_SEED}:9042 -s --timeout=0
echo Creating keyspace
cat << EOF | python3
from swh.storage.cassandra import create_keyspace
-create_keyspace(['cassandra-seed'], 'swh')
+create_keyspace(['${CASSANDRA_SEED}'], 'swh')
EOF
fi
case "$1" in
"shell")
exec bash -i
;;
*)
if [ "$STORAGE_BACKEND" = "postgresql" ]; then
wait_pgsql ${POSTGRES_DB}
echo Database setup
echo Creating extensions...
swh db init-admin --db-name ${POSTGRES_DB} storage
echo Initializing the database...
swh db init --db-name ${POSTGRES_DB} storage
fi
echo Starting the swh-storage API server
exec gunicorn --bind 0.0.0.0:5002 \
--reload \
--threads 4 \
--workers 2 \
--log-level DEBUG \
--timeout 3600 \
--config 'python:swh.core.api.gunicorn_config' \
'swh.storage.api.server:make_app_from_configfile()'
;;
esac
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Fri, Jul 4, 12:30 PM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3252276
Attached To
rDENV Development environment
Event Timeline
Log In to Comment