mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
chore: quick run script
fix: run in production mode by default
This commit is contained in:
parent
2b45b064eb
commit
0bccbffd80
@ -1,4 +1,4 @@
|
||||
env: development
|
||||
env: production
|
||||
|
||||
server:
|
||||
listen_ipv4: 127.0.0.1 # leave blank to disable ipv4
|
||||
@ -30,8 +30,8 @@ db:
|
||||
automgirate_fail_silently: false # whether to ignore schema auto-migration failures when starting up
|
||||
|
||||
security:
|
||||
password_salt: # CHANGE !
|
||||
insecure_cookies: false # You need to set this to 'true' when on localhost
|
||||
password_salt: # change this
|
||||
insecure_cookies: true # should be set to 'false', except when not running with HTTPS (e.g. on localhost)
|
||||
cookie_max_age: 172800
|
||||
allow_signup: true
|
||||
expose_metrics: false
|
||||
@ -45,7 +45,7 @@ sentry:
|
||||
mail:
|
||||
enabled: true # whether to enable mails (used for password resets, reports, etc.)
|
||||
provider: smtp # method for sending mails, currently one of ['smtp', 'mailwhale']
|
||||
smtp: # smtp settings when sending mails via smtp
|
||||
smtp: # smtp settings when sending mails via smtp
|
||||
host:
|
||||
port:
|
||||
username:
|
||||
|
12
scripts/config.yml
Normal file
12
scripts/config.yml
Normal file
@ -0,0 +1,12 @@
|
||||
# SQLite
|
||||
source:
|
||||
name: ../wakapi_db.db
|
||||
|
||||
# MySQL
|
||||
target:
|
||||
host: localhost
|
||||
port: 5432
|
||||
user: wakapi_user
|
||||
password: wakapi
|
||||
name: wakapi_local
|
||||
dialect:
|
86
scripts/get.sh
Normal file
86
scripts/get.sh
Normal file
@ -0,0 +1,86 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script installs Wakapi.
|
||||
#
|
||||
# Quick install: `curl https://wakapi.dev/get | bash`
|
||||
#
|
||||
# This script will install Wakapi to the directory you're in. To install
|
||||
# somewhere else (e.g. /usr/local/bin), cd there and make sure you can write to
|
||||
# that directory, e.g. `cd /usr/local/bin; curl https://wakapi.dev/get | sudo bash`
|
||||
#
|
||||
# Acknowledgments:
|
||||
# - Micro Editor for this script: https://micro-editor.github.io/
|
||||
# - ASCII art courtesy of figlet: http://www.figlet.org/
|
||||
|
||||
set -e -u
|
||||
|
||||
githubLatestTag() {
|
||||
finalUrl=$(curl "https://github.com/$1/releases/latest" -s -L -I -o /dev/null -w '%{url_effective}')
|
||||
printf "%s\n" "${finalUrl##*/}"
|
||||
}
|
||||
|
||||
platform=''
|
||||
machine=$(uname -m) # currently, Wakapi builds are only available for AMD64 anyway
|
||||
|
||||
if [ "${GETWAKAPI_PLATFORM:-x}" != "x" ]; then
|
||||
platform="$GETWAKAPI_PLATFORM"
|
||||
else
|
||||
case "$(uname -s | tr '[:upper:]' '[:lower:]')" in
|
||||
"linux") platform='linux_amd64' ;;
|
||||
"msys"*|"cygwin"*|"mingw"*|*"_nt"*|"win"*) platform='win_amd64' ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ "x$platform" = "x" ]; then
|
||||
cat << 'EOM'
|
||||
/=====================================\\
|
||||
| COULD NOT DETECT PLATFORM |
|
||||
\\=====================================/
|
||||
|
||||
Uh oh! We couldn't automatically detect your operating system. You can file a
|
||||
bug here: https://github.com/muety/wakapi
|
||||
EOM
|
||||
exit 1
|
||||
else
|
||||
printf "Detected platform: %s\n" "$platform"
|
||||
fi
|
||||
|
||||
TAG=$(githubLatestTag muety/wakapi)
|
||||
|
||||
printf "Tag: %s" "$TAG"
|
||||
|
||||
extension='zip'
|
||||
|
||||
printf "Latest Version: %s\n" "$TAG"
|
||||
printf "Downloading https://github.com/muety/wakapi/releases/download/%s/wakapi_%s.%s\n" "$TAG" "$platform" "$extension"
|
||||
|
||||
curl -L "https://github.com/muety/wakapi/releases/download/$TAG/wakapi_$platform.$extension" > "wakapi.$extension"
|
||||
|
||||
case "$extension" in
|
||||
"zip") unzip -j "wakapi.$extension" -d "wakapi-$TAG" ;;
|
||||
"tar.gz") tar -xvzf "wakapi.$extension" "wakapi-$TAG/wakapi" ;;
|
||||
esac
|
||||
|
||||
mv "wakapi-$TAG/wakapi" ./wakapi
|
||||
mv "wakapi-$TAG/config.yml" ./config.yml
|
||||
|
||||
rm "wakapi.$extension"
|
||||
rm -rf "wakapi-$TAG"
|
||||
|
||||
cat <<-'EOM'
|
||||
|
||||
__ __ _ _
|
||||
\ \ / /_ _| | ____ _ _ __ (_)
|
||||
\ \ /\ / / _` | |/ / _` | '_ \| |
|
||||
\ V V / (_| | < (_| | |_) | |
|
||||
\_/\_/ \__,_|_|\_\__,_| .__/|_|
|
||||
|_|
|
||||
|
||||
Wakapi has been downloaded to the current directory.
|
||||
You can run it with:
|
||||
|
||||
./wakapi
|
||||
|
||||
For further instructions see https://github.com/muety/wakapi
|
||||
|
||||
EOM
|
Loading…
Reference in New Issue
Block a user