Page MenuHomePhuks

Setup in Alpine Linux with pyenv
Updated 17 Days AgoPublic

This document was moved from elsewhere.

Assume basic installation of Alpine Linux, openssh server installed and setup, a non-root user created.

su -
apk add --no-cache git bash build-base libffi-dev openssl-dev bzip2-dev zlib-dev readline-dev sqlite-dev curl bash bash-doc bash-completion redis npm mariadb mariadb-client mariadb-connector-c-dev jpeg-dev exiv2-dev boost-dev libxml2-dev libxslt-dev
adduser --disabled-password --gecos "" -s /bin/bash app
su - app
 
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
echo 'export PATH="/home/app/.pyenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
bash
pyenv install 3.5.7
pyenv virtualenv 3.5.7 app
 
git clone https://phab.phuks.co/source/throat.git
cd throat
npm install
npm run build
pyenv local app
pip install --upgrade pip
pip install -r requirements.txt
 
exit
exit
mysql_install_db --user=mysql --datadir=/var/lib/mysql
rc-service mariadb start
mysqladmin -u root password "P@ssword"
rc-update add mariadb default
mysql -u root -p
CREATE DATABASE throat;
CREATE USER 'throat'@localhost IDENTIFIED BY 'P@ssword';
GRANT ALL PRIVILEGES ON throat.* TO 'throat'@localhost;
exit
 
rc-service redis start
rc-update add redis default
 
su - app
bash
cd throat
cp example.config.py config.py
nano config.py
#set DB_USER to throat
#set DB_PASSWD to P@ssword
#set DB_NAME to throat (or whatever was created, default is phuks)
 
cd scripts
./install.py
cd ..
nano wsgi.py
#socketio.run(app, debug=True, host='0.0.0.0')
 
# to run: ./wsgi.py
# find IP of your machine, visit: http://<ip address>:5000
# username: admin, password: adminadmin
Last Author
Polsaker
Last Edited
Thu, Apr 4, 10:00 PM

Event Timeline

Polsaker moved this document from Restricted Phriction Wiki DocumentThu, Apr 4, 10:00 PM
Polsaker changed the visibility from "All Users" to "Public (No Login Required)".