live_beats/rel/overlays/bin/server

21 lines
619 B
Text
Raw Normal View History

2021-12-03 13:54:28 +00:00
#!/bin/sh
2024-04-09 00:53:14 +00:00
if [ -n "${BUCKET_MOUNT}" ]; then
mkdir -p "${BUCKET_MOUNT}"
chown nobody:nogroup "${BUCKET_MOUNT}"
echo "Mounting S3 bucket at ${BUCKET_MOUNT}"
echo $AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY > ${HOME}/.passwd-s3fs
chmod 600 ${HOME}/.passwd-s3fs
s3fs livebeats-store "${BUCKET_MOUNT}" \
-o url="${AWS_ENDPOINT_URL_S3}" \
-o dbglevel=info \
-o curldbg \
-o use_path_request_style \
-o allow_other \
-o _netdev \
-o uid="$(id -u nobody)" \
-o gid="$(id -g nobody)"
fi
2021-12-03 13:54:28 +00:00
cd -P -- "$(dirname -- "$0")"
2024-04-09 00:53:14 +00:00
su -s /bin/bash nobody -c 'PHX_SERVER=true exec ./live_beats start'