Let me just say I'm not the biggest docker fan but it is helpful to document what is needed to install a system. This script should help people who have never tried to install phuks to get further to a successful install than they ever have.
Here's what I have. It is psuedo-code really meant to be pasted into a console than used with docker at this point.
base debian
apt-get update
apt-get install git python3 mysql-server redis-server libmariadbclient-dev libboost-python-dev python3-pip wget libffi-dev libexiv2-dev
wget https://nodejs.org/dist/v9.11.1/node-v9.11.1-linux-x64.tar.xz -O node.tar.gz
tar xf node.tar.xz
cd node-*
for i in bin include lib share
do
mkdir -p /usr/local/$i
cp -a $i/* /usr/local/$i
done
cd -
rm node* -r
git clone https://phab.phuks.co/source/throat.git
cd throat
npm install
pip3 install -r requirements.txt
mv example.config.py config.py
/etc/init.d/mysql start
echo 'create database phuks;' | mysql
mysql phuks < throat.sql
redis-server &
./wcgi.py
After you do
npm install
you must donpm run build
to compile the assets (this will also generate the manifest.json that you need to run wsgi.py)Also, i'd recommend using scripts/install.py instead of dumping throat.sql into the database, because throat.sql is only there to do some tests and it's outdated (install.py will create an admin account too, username is admin and password is adminadmin).
Finally, if you're going to use this for production you should use something like
gunicorn
, because wsgi.py is only good for debugging