An internet relay chat robot and web-based graphical user interface, dance event, and other things mashed together
|
|
6 жил өмнө | |
|---|---|---|
| rotbot | 6 жил өмнө | |
| website | 6 жил өмнө | |
| .gitignore | 6 жил өмнө | |
| README.md | 6 жил өмнө | |
| package.json | 6 жил өмнө | |
| requirements.txt | 6 жил өмнө | |
| semantic.json | 6 жил өмнө | |
| uwsgi_params | 6 жил өмнө | |
| website_nginx.conf | 6 жил өмнө | |
| website_uwsgi.ini | 6 жил өмнө |
Django project, without virtual environment.
Hint, to create a virtualenv in the current dir: virtualenv --python=python3.7 .
This probably requires you to have built python3.7 manually and have debian packages installed: python3-virtualenv python-virtualenv
Then activate the virtenv: source bin/activate
To later deactive: deactivate
Older versions might work, development environ and runtime environment run Python-3.7.4 Currently newer then in the repo's, if that's still the case, you might have to compile and built it yourself.
If you notice you can' t use ssl when using pip, you should have installed libssl-dev before building python, or any of the following packages: libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
Install either postgresql-server-dev-X.Y or libpq-dev: sudo apt install...
Install required pyton packages: pip3 install -r requirements.txt
Fill in the passwords, don't change the database name, it's hardcoded in pyRot, for now.
sudo apt install postrgresqlsudo su - postgresqlpsqlCREATE DATABASE website WITH OWNER = website;CREATE ROLE pyrot WITH LOGIN PASSWORD '';GRANT ALL ON DATABASE website TO pyrot;GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO pyrot;GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO pyrot;For now, set the database authentication details in the following files:
cd websitepython manage.py makemigrationspython manage.py migratepython manage.py collectstaticsudo ln -s /opt/h0v1n8-website-env/website_uwsgi.ini /etc/uwsgi/vassals/website_uwsgi.inisudo nano /etc/rc.local:
#!/bin/sh
/opt/h0v1n8-env/bin/uwsgi --emperor /etc/uwsgi/vassals/ --daemonize /var/log/uwsgi-emperor.log`
exit 0
Test with: bin/uwsgi --emperor /etc/uwsgi/vassals/
TBD
/etc/rc.local:
STATIC_ROOT in website/website/settings.py.sudo ln -s /opt/h0v1n8-website-env/website_nginx.conf /etc/nginx/sites-enabled/website_nginx.confsudo systemctl reload nginxcd websitepython manage.py runserverThe pythonic version of RotBot, there have been 5 earlier versions including winRot and javaRot.
cd rotbotpython bot.py 1 Where 1 is the ID of the server database record.On debian: sudo apt install npm