add proper instructions
This commit is contained in:
28
start.sh
Executable file
28
start.sh
Executable file
@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
start() {
|
||||
lapis serve
|
||||
}
|
||||
|
||||
first_launch() {
|
||||
echo "Setting up for the first time"
|
||||
touch ".first_launch.$LAPIS_ENVIRONMENT"
|
||||
lua5.1 schema.lua
|
||||
lapis migrate
|
||||
lua5.1 create_default_accounts.lua
|
||||
}
|
||||
|
||||
if [[ $# -ne 1 ]]; then
|
||||
export LAPIS_ENVIRONMENT="development"
|
||||
echo "WARN: no environment passed, assuming default (development)"
|
||||
else
|
||||
export LAPIS_ENVIRONMENT="$1"
|
||||
fi
|
||||
|
||||
echo "Starting in $LAPIS_ENVIRONMENT"
|
||||
|
||||
if ! [ -f ".first_launch.$LAPIS_ENVIRONMENT" ]; then
|
||||
first_launch
|
||||
fi
|
||||
|
||||
start
|
Reference in New Issue
Block a user