4

Well this mess of a start to a write up worked once. Second run I can't get pass npm build run(I believe npm install is failing due to nodejs version but thats just a guess at this point) I thought I would share for anyone else trying. Also ubuntu 16.04

libboost-python-dev python3-pip wget libffi-dev libexiv2-dev 1. install pyenv - $ curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash 2. Use these instructions note to change the commands to .bashrc https://github.com/pyenv/pyenv-installer use this to complete setup $ echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc $ echo 'eval "$(pyenv init -)"' >> ~/.bashrc $ echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc $ source ~/.bashrc

  1. pyenv install 3.5.5
  2. pyenv virtualenv 3.5.5 app
  3. clone source cd into throat
  4. pip install -r requirements.txt(Fixes for errors in list below)

Flask==0.11.1 Flask-WTF==0.13.1 bcrypt==3.1.3 flask-assets webassets jsmin cssmin misaka Flask-Login==0.4.0 feedgen flask-caching flask-cache mysqlclient - Install libmysqlclient-dev fixed redis requests pillow pytest sendgrid bs4 flask-oauthlib Flask-SocketIO==2.8.2 eventlet gunicorn cython peewee==3.2.2 - install libsqlite3-dev fixed Flask-Webpack==0.1.0 wheezy.template wheezy.html python-magic py3exiv2 - install libboost-python-dev, libexiv2-dev tinycss2==0.6.1

7.Once all dependancies are installed without errors 7a. install nodejs and npm, symlink "sudo ln -s /usr/bin/nodejs /usr/bin/node"cd 8.sudo npm install 9.sudo npm run build 10. cp example.config.py config.py 11. cd into scripts 12. Set sql root password 12a. change sql root password in config.py & create sql database phuks 13. Run python install.py 14. mysql -u -root -p, SET GLOBAL sql_mode=''; nginx and gunicorn setup https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-14-04 Too be continued

Well this mess of a start to a write up worked once. Second run I can't get pass npm build run(I believe npm install is failing due to nodejs version but thats just a guess at this point) I thought I would share for anyone else trying. Also ubuntu 16.04 libboost-python-dev python3-pip wget libffi-dev libexiv2-dev 1. install pyenv - $ curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash 2. Use these instructions note to change the commands to .bashrc https://github.com/pyenv/pyenv-installer use this to complete setup $ echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc $ echo 'eval "$(pyenv init -)"' >> ~/.bashrc $ echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc $ source ~/.bashrc 3. pyenv install 3.5.5 4. pyenv virtualenv 3.5.5 app 5. clone source cd into throat 6. pip install -r requirements.txt(Fixes for errors in list below) Flask==0.11.1 Flask-WTF==0.13.1 bcrypt==3.1.3 flask-assets webassets jsmin cssmin misaka Flask-Login==0.4.0 feedgen flask-caching flask-cache mysqlclient - Install libmysqlclient-dev fixed redis requests pillow pytest sendgrid bs4 flask-oauthlib Flask-SocketIO==2.8.2 eventlet gunicorn cython peewee==3.2.2 - install libsqlite3-dev fixed Flask-Webpack==0.1.0 wheezy.template wheezy.html python-magic py3exiv2 - install libboost-python-dev, libexiv2-dev tinycss2==0.6.1 7.Once all dependancies are installed without errors 7a. install nodejs and npm, symlink "sudo ln -s /usr/bin/nodejs /usr/bin/node"cd 8.sudo npm install 9.sudo npm run build 10. cp example.config.py config.py 11. cd into scripts 12. Set sql root password 12a. change sql root password in config.py & create sql database phuks 13. Run python install.py 14. mysql -u -root -p, SET GLOBAL sql_mode=''; nginx and gunicorn setup https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-14-04 Too be continued

6 comments

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

I was building a how-to just a few mins ago and my computer froze and I lost my notes. Now I'm pissed and working on something else until I come back to it. I was past that and having trouble with nginx proxy ports..

I dont use the apt install nodejs version and use this for my node/npm

curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -

apt-get install -y nodejs

I also l usually do the requirements globally with pip3 install -r requirements.txt even though @polsaker reeeees at me. I actually use ubuntu for my dev. I'll boot that up in a bit and see what I can get out of it.

[–] pmyb2 [OP] 1 points (+1|-0) Edited

I did use pip install -r requirements.txt but it often failed because I didn't always have all the needed packages installed. now that I know them better I'll probably use it. does this mean @polsaker will reee at me too? I'm not sure I want that. What do you guys run for production? I'm going to try the whole thing under debian tonight and see what I get.

As a long time helpdesk/sysadmin/itconsultant why did your computer freeze? Are you sure the notes are not sitting in a temp file in your profile?

EDIT: Also thanks for the node install command appreciated I'll try it and see what I get.

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

We use Debian for prod.

I was looking for my lost notes, but they were in a vm and the main machine died. When I booted the vm it didnt see any changes from my last boot. Oh well, I remember most of it. It's been so long since a fresh install, I forgot about all the extra little settings. I'm hoping to have something up here by tonight.

[–] pmyb2 [OP] 1 points (+1|-0)

Wow that sucks. I would be pissed. Saving wouldn’t have even helped. Snapshots every 5 minutes is clearly the only solution.