Merge remote-tracking branch 'origin/develop' into shigusegubu
* origin/develop: (269 commits) Apply suggestion to docs/administration/CLI_tasks/user.md rename mix task: `pleroma.user unsubscribe` -> `pleroma.user deactivate` Added the ability to upload background, logo, default user avatar, instance thumbnail, and the NSFW hiding image via AdminFE fixed `mix pleroma.instance gen` Also add new sidebarRight setting Add `background_image` to `InstanceOperation` Move notification actions to PleromaAPI.NotificationController Move conversation actions to PleromaAPI.ConversationController Move reaction actions to EmojiReactionController Add OpenAPI spec for PleromaAPI.PleromaAPIController Changelog: Add background to instance Docs: Add background_image in instance InstanceOperation: Add background image to example MastoFE: update to bundle-2020-05-20 Apply suggestion to installation/nginx-cache-purge.sh.example update purge script Synchronize :fe settings in config.exs Fix summary User.Query: Remove superfluous `distinct` UserTest: Hide warning in tests. ...
This commit is contained in:
commit
f9b13c754c
859 changed files with 17309 additions and 8204 deletions
|
|
@ -1,21 +1,45 @@
|
|||
#!/sbin/openrc-run
|
||||
|
||||
# Requires OpenRC >= 0.35
|
||||
directory=/opt/pleroma
|
||||
|
||||
command=/usr/bin/mix
|
||||
command_args="phx.server"
|
||||
supervisor=supervise-daemon
|
||||
command_user=pleroma:pleroma
|
||||
command_background=1
|
||||
|
||||
export PORT=4000
|
||||
export MIX_ENV=prod
|
||||
|
||||
# Ask process to terminate within 30 seconds, otherwise kill it
|
||||
retry="SIGTERM/30/SIGKILL/5"
|
||||
|
||||
pidfile="/var/run/pleroma.pid"
|
||||
directory=/opt/pleroma
|
||||
healthcheck_delay=60
|
||||
healthcheck_timer=30
|
||||
|
||||
: ${pleroma_port:-4000}
|
||||
|
||||
# Needs OpenRC >= 0.42
|
||||
#respawn_max=0
|
||||
#respawn_delay=5
|
||||
|
||||
# put pleroma_console=YES in /etc/conf.d/pleroma if you want to be able to
|
||||
# connect to pleroma via an elixir console
|
||||
if yesno "${pleroma_console}"; then
|
||||
command=elixir
|
||||
command_args="--name pleroma@127.0.0.1 --erl '-kernel inet_dist_listen_min 9001 inet_dist_listen_max 9001 inet_dist_use_interface {127,0,0,1}' -S mix phx.server"
|
||||
|
||||
start_post() {
|
||||
einfo "You can get a console by using this command as pleroma's user:"
|
||||
einfo "iex --name console@127.0.0.1 --remsh pleroma@127.0.0.1"
|
||||
}
|
||||
else
|
||||
command=/usr/bin/mix
|
||||
command_args="phx.server"
|
||||
fi
|
||||
|
||||
export MIX_ENV=prod
|
||||
|
||||
depend() {
|
||||
need nginx postgresql
|
||||
need nginx postgresql
|
||||
}
|
||||
|
||||
healthcheck() {
|
||||
# put pleroma_health=YES in /etc/conf.d/pleroma if you want healthchecking
|
||||
# and make sure you have curl installed
|
||||
yesno "$pleroma_health" || return 0
|
||||
|
||||
curl -q "localhost:${pleroma_port}/api/pleroma/healthcheck"
|
||||
}
|
||||
|
|
|
|||
40
installation/nginx-cache-purge.sh.example
Executable file
40
installation/nginx-cache-purge.sh.example
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/sh
|
||||
|
||||
# A simple shell script to delete a media from the Nginx cache.
|
||||
|
||||
SCRIPTNAME=${0##*/}
|
||||
|
||||
# NGINX cache directory
|
||||
CACHE_DIRECTORY="/tmp/pleroma-media-cache"
|
||||
|
||||
## Return the files where the items are cached.
|
||||
## $1 - the filename, can be a pattern .
|
||||
## $2 - the cache directory.
|
||||
## $3 - (optional) the number of parallel processes to run for grep.
|
||||
get_cache_files() {
|
||||
local max_parallel=${3-16}
|
||||
find $2 -maxdepth 2 -type d | xargs -P $max_parallel -n 1 grep -E Rl "^KEY:.*$1" | sort -u
|
||||
}
|
||||
|
||||
## Removes an item from the given cache zone.
|
||||
## $1 - the filename, can be a pattern .
|
||||
## $2 - the cache directory.
|
||||
purge_item() {
|
||||
for f in $(get_cache_files $1 $2); do
|
||||
echo "found file: $f"
|
||||
[ -f $f ] || continue
|
||||
echo "Deleting $f from $2."
|
||||
rm $f
|
||||
done
|
||||
} # purge_item
|
||||
|
||||
purge() {
|
||||
for url in "$@"
|
||||
do
|
||||
echo "$SCRIPTNAME delete \`$url\` from cache ($CACHE_DIRECTORY)"
|
||||
purge_item $url $CACHE_DIRECTORY
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
purge $1
|
||||
|
|
@ -32,9 +32,8 @@ CustomLog ${APACHE_LOG_DIR}/access.log combined
|
|||
|
||||
<VirtualHost *:443>
|
||||
SSLEngine on
|
||||
SSLCertificateFile /etc/letsencrypt/live/${servername}/cert.pem
|
||||
SSLCertificateFile /etc/letsencrypt/live/${servername}/fullchain.pem
|
||||
SSLCertificateKeyFile /etc/letsencrypt/live/${servername}/privkey.pem
|
||||
SSLCertificateChainFile /etc/letsencrypt/live/${servername}/fullchain.pem
|
||||
|
||||
# Mozilla modern configuration, tweak to your needs
|
||||
SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue