5

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
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 ```

7 comments

[–] Polsaker 2 points (+2|-0) Edited

After you do npm install you must do npm 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

[–] fusir [OP] 0 points (+0|-0)

Thanks. I have the program running, all off of one script. It doesn't seem to take connections and doesn't spit out any debug information I can find. I can write a one line server in nodejs on the same port so I can see that it's not docker. Is there some commandline options to tell it to be verbose?

[–] Polsaker 0 points (+0|-0)

Node here doesn't serve anything and it doesn't listen to any connections. npm start will just sit watching for any file changes to recompile the assets. wsgi.py will usually listen on 127.0.0.1:5000 so you won't be able to contact it from the outside. You can add host="0.0.0.0" inside of socketio.run(...) in that file so it'll listen to outside connections.

[–] fusir [OP] 0 points (+0|-0)

Ah, the node I was refering to was just illustrating that docker is successfully passing to the port. I just ran.

http.createServer((a,b)=>{b.end('hi');}).listen(5000);

I'll try the host=0.0.0.0