Related pages: 🇫🇷 Assistant pour installer Pwic.wiki
1. Wizard to setup Pwic.wiki at light speed by shell
Please answer the following questions to download the automatic script applicable to Debian Linux on a dedicated host.
Update the operating system
Install Python 3
Define the existing and empty path where you want to save Pwic.wiki's files:
Clone the official Git repository
Install the Python dependencies
Name of your user account in Pwic.wiki:
Name of your project:
Description of your project:
With HTTP log
Pwic.wiki is behind a reverse proxy
Maximal security by default
The federated authentication (SSO) will be used in the future
Base address of your website without the trailing slash:
I refuse the robots (Google, Bing...)
I need a wysiwyg editor to write the pages (much less features than the raw editor)
User registration is not mandatory to read the pages (aka. public website)
If the users need to register, provide the URL of your custom online form:
What can do the users to request support ?
- By email:
- By phone:
- By special instructions:
- By web form:
#!/bin/sh
# Script generated at https://pwic.wiki/en/wizard
# Configuration
wizard_aptget=$(wizard_aptget)
wizard_python=$(wizard_python)
wizard_path="$(wizard_path)"
wizard_clone=$(wizard_clone)
wizard_pip=$(wizard_pip)
wizard_account="$(wizard_account)"
wizard_project="$(wizard_project)"
wizard_description="$(wizard_description)"
wizard_log=$(wizard_log)
wizard_reverseproxy=$(wizard_reverseproxy)
wizard_maxsecurity=$(wizard_maxsecurity)
wizard_sso=$(wizard_sso)
wizard_baseurl="$(wizard_baseurl)"
wizard_robots=$(wizard_robots)
wizard_wysiwyg=$(wizard_wysiwyg)
wizard_nologin=$(wizard_nologin)
wizard_registration="$(wizard_registration)"
wizard_support_email="$(wizard_support_email)"
wizard_support_phone="$(wizard_support_phone)"
wizard_support_text="$(wizard_support_text)"
wizard_support_url="$(wizard_support_url)"
# Confirmation
echo -n "You are \"$(whoami)\". Pwic.wiki will run under this identity. Are you sure to continue ? [Y/n] "
read -r answer
if [ "$answer" != "Y" ]; then
echo "Bye :'("
exit
fi
# Update the OS and dependencies
if [ $wizard_aptget = true ] || [ $wizard_python = true ]; then
su
if [ $wizard_aptget = true ]; then
apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get full-upgrade
fi
if [ $wizard_python = true ]; then
apt-get install python3 python3-pip --no-install-recommends
fi
exit
fi
# Go to the path
cd $wizard_path || exit
# Clone the repository
if [ $wizard_clone = true ]; then
git clone https://github.com/gitbra/pwic.git . || exit
fi
# Install the Python dependencies
if [ $wizard_pip = true ]; then
su
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade -r requirements.txt
apt-get install gzip --no-install-recommends
exit
fi
# Configure Pwic.wiki
./pa init-db
./pa create-project "$wizard_project" "$wizard_description" "$wizard_account"
./pa reset-password "$wizard_account"
if [ $wizard_log = true ]; then
./pa set-env http_log_file "./db/pwic.log"
fi
if [ $wizard_reverseproxy = true ]; then
./pa set-env http_log_format "%{X-Forwarded-For}i %t \"%r\" %s %b"
./pa compress-static
fi
if [ $wizard_maxsecurity = true ]; then
./pa set-env document_size_max 10485760
./pa set-env edit_time_min 30
./pa set-env fixed_templates X
./pa set-env keep_drafts X
./pa set-env link_new_tab X
./pa set-env link_nofollow X
./pa set-env magic_bytes X
./pa set-env project_size_max 104857600
./pa set-env seo_hide_revs X
./pa set-env session_expiry 900
./pa set-env show_members_max 100
if [ $wizard_sso = false ]; then
./pa set-env strict_cookies X
fi
./pa set-env zip_no_exec X
fi
./pa set-env base_url "$wizard_baseurl"
if [ $wizard_nologin = true ]; then
./pa set-env no_login X
fi
if [ $wizard_robots = true ]; then
./pa set-env robots "noarchive noindex nofollow nosnippet"
fi
if [ $wizard_wysiwyg = true ]; then
./pa set-env mde X
fi
./pa set-env rstrip X
./pa set-env registration_link "$wizard_registration"
./pa set-env support_email "$wizard_support_email"
./pa set-env support_phone "$wizard_support_phone"
./pa set-env support_text "$wizard_support_text"
./pa set-env support_url "$wizard_support_url"
# Summary
echo "The setup is complete. Here is a summary of your current options:"
./pa show-env --list
echo "Start your server with: python3 pwic.py --help"
Revision #1 was last modified by gitbra
on 2024-11-30 at 00:00:00 — 0ab7731c1581a7b1