mirror of
https://github.com/YunoHost-Apps/piped_ynh.git
synced 2024-09-03 20:05:54 +02:00
Use proper config
This commit is contained in:
parent
ba45c5756b
commit
91bee9fae6
2 changed files with 96 additions and 3 deletions
91
conf/config.properties
Normal file
91
conf/config.properties
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
# The port to Listen on.
|
||||||
|
PORT:8080
|
||||||
|
# The number of workers to use for the server
|
||||||
|
HTTP_WORKERS:2
|
||||||
|
|
||||||
|
# Proxy
|
||||||
|
PROXY_PART:https://__HOST__/__PATH__/proxy
|
||||||
|
|
||||||
|
# Proxy Hash Secret
|
||||||
|
#PROXY_HASH_SECRET:INSERT_HERE
|
||||||
|
|
||||||
|
# Outgoing proxy to be used by reqwest4j - eg: socks5://127.0.0.1:1080
|
||||||
|
#REQWEST_PROXY: socks5://127.0.0.1:1080
|
||||||
|
# Optional proxy username and password
|
||||||
|
#REQWEST_PROXY_USER: username
|
||||||
|
#REQWEST_PROXY_PASS: password
|
||||||
|
|
||||||
|
# Captcha Parameters
|
||||||
|
CAPTCHA_BASE_URL:https://api.capmonster.cloud/
|
||||||
|
CAPTCHA_API_KEY:INSERT_HERE
|
||||||
|
|
||||||
|
# Public API URL
|
||||||
|
API_URL:https://__HOST__/__PATH__/api
|
||||||
|
|
||||||
|
# Public Frontend URL
|
||||||
|
FRONTEND_URL:https://__HOST__/__PATH__
|
||||||
|
|
||||||
|
# Enable haveibeenpwned compromised password API
|
||||||
|
COMPROMISED_PASSWORD_CHECK:true
|
||||||
|
|
||||||
|
# Disable Registration
|
||||||
|
DISABLE_REGISTRATION:false
|
||||||
|
|
||||||
|
# Feed Retention Time in Days
|
||||||
|
FEED_RETENTION:30
|
||||||
|
|
||||||
|
# Disable CPU expensive timers (for nodes with low CPU, at least one node should have this disabled)
|
||||||
|
DISABLE_TIMERS:false
|
||||||
|
|
||||||
|
# RYD Proxy URL (see https://github.com/TeamPiped/RYD-Proxy)
|
||||||
|
RYD_PROXY_URL:https://ryd-proxy.kavin.rocks
|
||||||
|
|
||||||
|
# SponsorBlock Servers(s)
|
||||||
|
# Comma separated list of SponsorBlock Servers to use
|
||||||
|
SPONSORBLOCK_SERVERS:https://sponsor.ajay.app,https://sponsorblock.kavin.rocks
|
||||||
|
|
||||||
|
# Disable the usage of RYD
|
||||||
|
DISABLE_RYD:true
|
||||||
|
|
||||||
|
# Disable API server (node just runs timers if enabled)
|
||||||
|
DISABLE_SERVER:false
|
||||||
|
|
||||||
|
# Disable the inclusion of LBRY streams
|
||||||
|
DISABLE_LBRY:false
|
||||||
|
|
||||||
|
# How long should unauthenticated subscriptions last for
|
||||||
|
SUBSCRIPTIONS_EXPIRY:30
|
||||||
|
|
||||||
|
# Send consent accepted cookie
|
||||||
|
# This is required for certain features to work in some countries
|
||||||
|
CONSENT_COOKIE:true
|
||||||
|
|
||||||
|
# Sentry DSN
|
||||||
|
# Use Sentry to log errors and trace performance
|
||||||
|
#SENTRY_DSN:INSERT_HERE
|
||||||
|
|
||||||
|
# Matrix Client Server URL
|
||||||
|
MATRIX_SERVER:https://matrix-client.matrix.org
|
||||||
|
# Matrix Access Token
|
||||||
|
# If not present, will work in anon mode
|
||||||
|
#MATRIX_TOKEN:INSERT_HERE
|
||||||
|
|
||||||
|
# Geo Restriction Checker for federated bypassing of Geo Restrictions
|
||||||
|
#GEO_RESTRICTION_CHECKER_URL:INSERT_HERE
|
||||||
|
|
||||||
|
# S3 Configuration Data (compatible with any provider that offers an S3 compatible API)
|
||||||
|
#S3_ENDPOINT:INSERT_HERE
|
||||||
|
#S3_ACCESS_KEY:INSERT_HERE
|
||||||
|
#S3_SECRET_KEY:INSERT_HERE
|
||||||
|
#S3_BUCKET:INSERT_HERE
|
||||||
|
|
||||||
|
# Hibernate properties
|
||||||
|
hibernate.connection.url:jdbc:postgresql://postgres:5432/__DB_NAME__
|
||||||
|
hibernate.connection.driver_class:org.postgresql.Driver
|
||||||
|
hibernate.dialect:org.hibernate.dialect.PostgreSQLDialect
|
||||||
|
hibernate.connection.username:__DB_USER__
|
||||||
|
hibernate.connection.password:__DB_PASS__
|
||||||
|
|
||||||
|
# Frontend configuration
|
||||||
|
#frontend.statusPageUrl:https://kavin.rocks
|
||||||
|
#frontend.donationUrl:https://kavin.rocks
|
|
@ -18,8 +18,6 @@ ynh_use_nodejs
|
||||||
|
|
||||||
ynh_setup_source --dest_dir="$install_dir/jdk" --source_id="jdk"
|
ynh_setup_source --dest_dir="$install_dir/jdk" --source_id="jdk"
|
||||||
|
|
||||||
export JAVA_HOME="$install_dir/jdk"
|
|
||||||
|
|
||||||
ynh_exec_warn_less ynh_exec_as $app RUSTUP_HOME="$install_dir"/.rustup CARGO_HOME="$install_dir"/.cargo bash -c 'curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -q -y'
|
ynh_exec_warn_less ynh_exec_as $app RUSTUP_HOME="$install_dir"/.rustup CARGO_HOME="$install_dir"/.cargo bash -c 'curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -q -y'
|
||||||
export PATH="$install_dir/jdk/bin:$install_dir/.cargo/bin:$PATH"
|
export PATH="$install_dir/jdk/bin:$install_dir/.cargo/bin:$PATH"
|
||||||
|
|
||||||
|
@ -58,11 +56,15 @@ chmod -R 755 "$install_dir/dist"
|
||||||
ynh_script_progression --message="Building API..." --weight=5
|
ynh_script_progression --message="Building API..." --weight=5
|
||||||
|
|
||||||
pushd $install_dir/build_api
|
pushd $install_dir/build_api
|
||||||
ynh_exec_warn_less ynh_exec_as $app ./gradlew shadowJar
|
ynh_secure_remove --file="$install_dir/build_api/config.properties"
|
||||||
|
ynh_add_config --template="config.properties" --destination="$install_dir/build_api/config.properties"
|
||||||
|
ynh_exec_warn_less ynh_exec_as $app JAVA_HOME=$install_dir/jdk ./gradlew shadowJar
|
||||||
popd
|
popd
|
||||||
|
|
||||||
mv $install_dir/build_api/build/libs/piped-1.0-all.jar $install_dir/piped.jar
|
mv $install_dir/build_api/build/libs/piped-1.0-all.jar $install_dir/piped.jar
|
||||||
|
|
||||||
|
ynh_script_progression --message="Building Proxy..." --weight=5
|
||||||
|
|
||||||
pushd $install_dir/build_proxy
|
pushd $install_dir/build_proxy
|
||||||
ynh_exec_warn_less ynh_exec_as $app cargo build --release
|
ynh_exec_warn_less ynh_exec_as $app cargo build --release
|
||||||
popd
|
popd
|
||||||
|
|
Loading…
Add table
Reference in a new issue