mirror of
https://gitlab.com/famedly/conduit.git
synced 2025-09-10 18:51:00 +00:00
Initial snapcraft metadata
This commit is contained in:
parent
7078443460
commit
a1af588246
3 changed files with 82 additions and 0 deletions
23
snap/local/set-environment
Executable file
23
snap/local/set-environment
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
enabled="$(snapctl get enabled)"
|
||||
if [ -z "${enabled}" -o "${enabled}" != "true" ]
|
||||
then
|
||||
echo "Conduit not yet enabled"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
export ROCKET_SERVER_NAME="$(snapctl get base-url)"
|
||||
|
||||
listen_address="$(snapctl get listen.address)"
|
||||
if [ -n "${listen_address}" ]
|
||||
then
|
||||
export ROCKET_ADDRESS="$(snapctl get listen.address)"
|
||||
export ROCKET_PORT="$(snapctl get listen.port)"
|
||||
fi
|
||||
|
||||
export ROCKET_ENV="production"
|
||||
export ROCKET_DATABASE_PATH=${SNAP_DATA}
|
||||
|
||||
cd ${SNAP}
|
||||
exec $@
|
Loading…
Add table
Add a link
Reference in a new issue