Sinnes-tau.de Homepage
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

1.6 KiB

Sinnes Tau Homepage

Git use

Production

python manage.py  makemigrations hpst

Entwicklung:

Fake migration of DB:

On mysql:

delete from django_migrations;

On django:

rm -rf hpst/migrations/
python manage.py migrate --fake
python manage.py makemigrations hpst
python manage.py migrate --fake-initial
python manage.py runserver 192.168.178.25:8008

Server Installation

apt install python3-venv libmariadb-dev python3-dev libpcre3 libpcre3-dev

mkdir /srv/www/sinnes-tau
cd /srv/www/sinnes-tau
git clone http://git.kuntner.de/peter/sinnes-tau.git server
python3 -m venv venv3

cd server/

pip install -r requirements.txt 

#apt install grub2-common net-tools openssh-server gnupg virtualenv git-core  libmysqlclient-dev gcc python-dev python3-dev

/etc/systemd/system/uwsgi.service
[Unit]
Description=uWSGI instance to serve sinnes-tau

[Service]
User = www-data
Group = www-data
#WorkingDirectory=/srv/www/sinnes-tau/server/
#Environment="PATH=/srv/www/sinnes-tau/server/var/www/flaskapp/venv/bin"
#ExecStart=/var/www/flaskapp/venv/bin/uwsgi --ini myproject.ini

ExecStartPre=-/usr/bin/bash -c 'mkdir -p /run/uwsgi; chown www-data:www-data /run/uwsgi'
#ExecStart=/usr/bin/bash -c 'cd /srv/www/sinnes-tau; source venv3/bin/activate; cd server;uwsgi  --socket 127.0.0.1:8081  --wsgi-file sinnestau/wsgi.py  --uid=www-data --gid=www-data'
ExecStart=/usr/bin/bash -c 'cd /srv/www/sinnes-tau; source venv3/bin/activate; cd server;uwsgi  --socket 127.0.0.1:8081  --wsgi-file sinnestau/wsgi.py'
[Install]
WantedBy=multi-user.target
systemctl daemon-reload

Peter Kuntner 2021