From: Christian Heller Date: Thu, 27 Feb 2020 22:49:10 +0000 (+0100) Subject: Fix. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/static/%7B%7B%20web_path%20%7D%7D/%7B%7Bprefix%7D%7D/conditions?a=commitdiff_plain;h=48f069dd3e790b8716d1a03fcd6892cb51f10199;p=config Fix. --- diff --git a/buster/setup_scripts/setup_pleroma_source.sh b/buster/setup_scripts/setup_pleroma_source.sh index 57989a1..614a7ed 100755 --- a/buster/setup_scripts/setup_pleroma_source.sh +++ b/buster/setup_scripts/setup_pleroma_source.sh @@ -34,8 +34,9 @@ chown -R pleroma:pleroma /opt/pleroma su pleroma -s $SHELL -lc 'git clone -b develop https://git.pleroma.social/pleroma/pleroma /opt/pleroma' su pleroma -s $SHELL -lc 'mix local.hex --force' su pleroma -s $SHELL -lc 'mix local.rebar --force' -su pleroma -s $SHELL -lc 'mix deps.get' -su pleroma -s $SHELL -lc "mix pleroma.instance gen \ +su pleroma -s $SHELL -lc "cd /opt/pleroma &&\ +mix deps.get &&\ +mix pleroma.instance gen \ --output config/generated_config.exs \ --output-psql /tmp/setup_db.psql \ --domain ${domain} \ @@ -52,14 +53,22 @@ su pleroma -s $SHELL -lc "mix pleroma.instance gen \ --static-dir /var/lib/pleroma/static \ --listen-ip 127.0.0.1 \ --listen-port 4000 \ ---dbpass $(pwgen -s 100 1)" -su pleroma -s $SHELL -lc 'mv config/{generated_config.exs,prod.secret.exs}' +--dbpass $(pwgen -s 100 1) &&\ +mv config/{generated_config.exs,prod.secret.exs}" su postgres -s $SHELL -lc 'psql -f /tmp/setup_db.psql' -su pleroma -s $SHELL -lc 'MIX_ENV=prod mix ecto.migrate' -#su pleroma -s $SHELL -lc 'MIX_ENV=prod mix phx.server' +su pleroma -s $SHELL -lc 'cd /opt/pleroma && MIX_ENV=prod mix ecto.migrate' -# TODO: config customization, single-pixel hack, info panel, TOS -# config dev.secret.exs +# TODO: config customization, prod.secret.exs + +# Single-pixel picture hack for removing Pleroma FE images. +cp "${config_tree_prefix}/other_files/pixel.png" /var/lib/pleroma/static/ +chown pleroma:nogroup /var/lib/pleroma/static/pixel.png + +# Info panel and TOS. +mkdir -p /var/lib/pleroma/static/instance +mkdir -p /var/lib/pleroma/static/static +cp "${config_tree_prefix}/other_files/pleroma_panel.html" /var/lib/pleroma/static/instance/panel.html +cp "${config_tree_prefix}/other_files/pleroma_terms-of-service.html" /var/lib/pleroma/static/static/terms-of-service.html # Set up letsencrypt certificate. TODO: Is it auto-renewed? ln -sf /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default