mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-13 19:06:26 +00:00
20 lines
606 B
Bash
20 lines
606 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
# Apply migrations
|
||
|
python manage.py migrate
|
||
|
|
||
|
# Collect static files
|
||
|
if [ $SKIP_COLLECT_STATIC ]; then
|
||
|
echo "Skipping collection of static files."
|
||
|
else
|
||
|
python manage.py collectstatic --noinput
|
||
|
fi
|
||
|
|
||
|
# Copy pb2/grpc files if they do exist
|
||
|
if [ ! -f "/usr/src/robosats/api/lightning/lightning_pb2.py" ]; then
|
||
|
echo "Looks like the first run of this container. pb2 and gRPC files were not detected on the attached volume, copying them into the attached volume /robosats/api/node ."
|
||
|
cp -R /tmp/* /usr/src/robosats/api/lightning/
|
||
|
fi
|
||
|
|
||
|
# Start server / gunicorn / daphne / command
|
||
|
exec "$@"
|