Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7450418
entrypoint.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
945 B
Subscribers
None
entrypoint.sh
View Options
#!/bin/bash
set
-e
if
[[
-d
/src
]]
;
then
for
srcrepo
in
/src/swh-*
;
do
pushd
$srcrepo
pip
install
-e
.
popd
done
fi
echo
Installed
Python
packages:
pip
list
echo
"
${
PGHOST
}
:5432:
${
POSTGRES_DB
}
:
${
PGUSER
}
:
${
POSTGRES_PASSWORD
}
"
>
~/.pgpass
cat
>
~/.pg_service.conf
<<EOF
[swh-scheduler]
dbname=${POSTGRES_DB}
host=${PGHOST}
port=5432
user=${PGUSER}
EOF
chmod
0600
~/.pgpass
case
"
$1
"
in
"shell"
)
exec
bash
-i
;;
"swh-scheduler"
)
exec
$@
;;
*
)
echo
Waiting
for
postgresql
to
start
until
psql
postgresql:///?service
=
swh-scheduler
-c
"select 1"
2
>
&
1
>
/dev/null
;
do
sleep
0
.1
;
done
echo
Setup
the
swh-scheduler
API
database
PGPASSWORD
=
${
POSTGRES_PASSWORD
}
swh-db-init
scheduler
\
--db-name
${
POSTGRES_DB
}
echo
Starting
the
swh-scheduler
API
server
exec
swh-scheduler
api-server
/scheduler.yml
esac
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Thu, Apr 17, 7:28 AM (5 d, 15 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3287677
Attached To
rDENV Development environment
Event Timeline
Log In to Comment