From 303027434d00ecce414f25000fa33b93e314ac15 Mon Sep 17 00:00:00 2001 From: Robert Einsle Date: Tue, 19 Feb 2019 14:16:04 +0100 Subject: [PATCH 01/25] Add installation information --- INSTALL.md | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 INSTALL.md diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..99b2a8e --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,149 @@ +# Preparing + +## Install and configure Mailsystem (postfix) so it is possible to send mails + +## apt install python3 python3-pip python3-venv python3-virtualenv + +## apt install uwsgi uwsgi-plugin-python3 + +## Install and configure mariadb-server + +## Install and configure nginx und selfencrypt + + +# Installation + +## Create databases for carom and carom-int + +``` +-- carom +CREATE DATABASE carom DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; +CREATE USER 'carom'@'localhost' IDENTIFIED BY 'xxx'; +GRANT ALL PRIVILEGES ON carom.* TO 'carom'@'localhost'; +CREATE DATABASE carom-int DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; +CREATE USER 'carom-int'@'localhost' IDENTIFIED BY 'xxx'; +GRANT ALL PRIVILEGES ON carom-int.* TO 'carom-int'@'localhost'; +FLUSH PRIVILEGES; +``` + +### Passphrases should be replaced by usefull characters + +## Create systemd unit file for uwsgi (/etc/systemd/system/uwsgi.service): + +``` +[Unit] +Description=uWSGI Emperor service + +[Service] +ExecStartPre=/bin/bash -c 'mkdir -p /run/uwsgi; chown www-data:www-data /run/uwsgi' +ExecStart=/usr/bin/uwsgi --emperor /etc/uwsgi/apps-enabled +Restart=always +KillSignal=SIGQUIT +Type=notify +NotifyAccess=all + +[Install] +WantedBy=multi-user.target +``` + +## Checkout carom + +``` +cd /srv +git clone http://git.einsle.de/carom/carom-server.git carom +git clone http://git.einsle.de/carom/carom-server.git carom-int +cd carom-int +git checkout develop +git pull +cd .. +``` + +## Install pipenv + +``` +Pip3 install –upgrade pipenv +``` + +## Create caromserver/local_settings.py for both environments: + +``` +cd caromserver +cp local_settings_example.py local_settings.py +vi local_settings.py +ALLOWED_HOSTS, ADMINS, DEBUG should be filled +SECRET_KEY use pwgen 50 1 to create content for +DATABASES settings +cd .. +mkdir .venv +pipenv install +pipenv run python manage.py migrate +pipenv run python manage.py collectstatic +``` + +Do it for /srv/carom and /srv/carom-int + +## Create config File for uwsgi/carom + +``` +# carom...ini file +[uwsgi] +plugin = python3 +chdir = /srv/carom/ +module = caromserver.wsgi:application +home = /srv/carom/.venv/ +master = true +processes = 5 +vacuum = true +uid = www-data +gid = www-data +workers = 2 +#socket = /run/uwsgi/app/carom.socket +chmod-socket = 660 +log-date = true +``` + +Create it for /etc/uwsgi/apps-available/carom and carom-int and link it +to /etc/uwsgi/apps-enabled/ +systemctl restart uwsgi +Show at syslog for errors and fix it. + +## Create Config File for nginx/carom + +``` +upstream socket_carom { + server unix:///run/uwsgi/app/carom.sock; +} + +server { + listen 80; + listen [::]:80; + server_name carom...; + return 301 https://$host$request_uri; +} + +server { + listen 443 ssl; + listen [::]:443 ssl; + server_name carom...; + ssl_certificate /etc/ssl/certs/xxx; + ssl_certificate_key /etc/ssl/private/xxx; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_ciphers HIGH:!aNULL:!MD5; + charset utf-8; + client_max_body_size 75M; # adjust to taste + location /media { + alias /srv/carom/media; + } + location /static { + alias /srv/carom/static; + } + location / { + uwsgi_pass socket_carom; + include /etc/nginx/uwsgi_params; + } +} +``` + +Create it for /etc/ngin/sites-available/carom... and carom-int... and link it +to /etc/ngin/sites-enabled/ +systemctl restart nginx From 40aa6efdcf4df9343ed70a9c009040e1f791f0ad Mon Sep 17 00:00:00 2001 From: Robert Einsle Date: Tue, 19 Feb 2019 14:18:06 +0100 Subject: [PATCH 02/25] Update INSTALL.md --- INSTALL.md | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 99b2a8e..8c20a88 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,15 +1,10 @@ # Preparing -## Install and configure Mailsystem (postfix) so it is possible to send mails - -## apt install python3 python3-pip python3-venv python3-virtualenv - -## apt install uwsgi uwsgi-plugin-python3 - -## Install and configure mariadb-server - -## Install and configure nginx und selfencrypt - +- [ ] Install and configure Mailsystem (postfix) so it is possible to send mails +- [ ] apt install python3 python3-pip python3-venv python3-virtualenv +- [ ] apt install uwsgi uwsgi-plugin-python3 +- [ ] Install and configure mariadb-server +- [ ] Install and configure nginx und selfencrypt # Installation From 506d97ba5adda6f6d032ea61116800399336fb67 Mon Sep 17 00:00:00 2001 From: Robert Einsle Date: Tue, 19 Feb 2019 14:19:36 +0100 Subject: [PATCH 03/25] Update INSTALL.md --- INSTALL.md | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 8c20a88..38b347c 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,14 +1,19 @@ # Preparing - [ ] Install and configure Mailsystem (postfix) so it is possible to send mails + - [ ] apt install python3 python3-pip python3-venv python3-virtualenv + - [ ] apt install uwsgi uwsgi-plugin-python3 + - [ ] Install and configure mariadb-server + - [ ] Install and configure nginx und selfencrypt + # Installation -## Create databases for carom and carom-int +- [ ] Create databases for carom and carom-int ``` -- carom @@ -21,9 +26,9 @@ GRANT ALL PRIVILEGES ON carom-int.* TO 'carom-int'@'localhost'; FLUSH PRIVILEGES; ``` -### Passphrases should be replaced by usefull characters +Passphrases should be replaced by usefull characters -## Create systemd unit file for uwsgi (/etc/systemd/system/uwsgi.service): +- [ ] Create systemd unit file for uwsgi (/etc/systemd/system/uwsgi.service): ``` [Unit] @@ -41,7 +46,7 @@ NotifyAccess=all WantedBy=multi-user.target ``` -## Checkout carom +- [ ] Checkout carom ``` cd /srv @@ -53,13 +58,13 @@ git pull cd .. ``` -## Install pipenv +- [ ] Install pipenv ``` Pip3 install –upgrade pipenv ``` -## Create caromserver/local_settings.py for both environments: +- [ ] Create caromserver/local_settings.py for both environments: ``` cd caromserver @@ -77,7 +82,13 @@ pipenv run python manage.py collectstatic Do it for /srv/carom and /srv/carom-int -## Create config File for uwsgi/carom +Create Superuser Accounts using: + +``` +pipenv run python manage.py createsuperuser +``` + +- [ ] Create config File for uwsgi/carom ``` # carom...ini file @@ -102,7 +113,7 @@ to /etc/uwsgi/apps-enabled/ systemctl restart uwsgi Show at syslog for errors and fix it. -## Create Config File for nginx/carom +- [ ] Create Config File for nginx/carom ``` upstream socket_carom { From 4e66551ac99018ebe60e9d71814fa368f2f85ed7 Mon Sep 17 00:00:00 2001 From: Robert Einsle Date: Tue, 19 Feb 2019 14:20:18 +0100 Subject: [PATCH 04/25] Update INSTALL.md --- INSTALL.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 38b347c..8d53563 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,13 +1,9 @@ # Preparing - [ ] Install and configure Mailsystem (postfix) so it is possible to send mails - - [ ] apt install python3 python3-pip python3-venv python3-virtualenv - - [ ] apt install uwsgi uwsgi-plugin-python3 - - [ ] Install and configure mariadb-server - - [ ] Install and configure nginx und selfencrypt @@ -110,7 +106,9 @@ log-date = true Create it for /etc/uwsgi/apps-available/carom and carom-int and link it to /etc/uwsgi/apps-enabled/ + systemctl restart uwsgi + Show at syslog for errors and fix it. - [ ] Create Config File for nginx/carom @@ -152,4 +150,5 @@ server { Create it for /etc/ngin/sites-available/carom... and carom-int... and link it to /etc/ngin/sites-enabled/ + systemctl restart nginx From 34a4a0b9aadb2723fed73ece8f1d55220ca28c1d Mon Sep 17 00:00:00 2001 From: Robert Einsle Date: Tue, 19 Feb 2019 14:22:59 +0100 Subject: [PATCH 05/25] Update INSTALL.md --- INSTALL.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 8d53563..94308f7 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -104,7 +104,7 @@ chmod-socket = 660 log-date = true ``` -Create it for /etc/uwsgi/apps-available/carom and carom-int and link it +Create it for /etc/uwsgi/apps-available/carom.ini and carom-int.ini and link it to /etc/uwsgi/apps-enabled/ systemctl restart uwsgi @@ -152,3 +152,15 @@ Create it for /etc/ngin/sites-available/carom... and carom-int... and link it to /etc/ngin/sites-enabled/ systemctl restart nginx + +- [ ] Create update.sh in carom and carom-int root mkdir + +``` +pushd /srv/carom/ +git pull +pipenv update +pipenv run ./manage.py migrate +pipenv run ./manage.py collectstatic --noinput +touch /etc/uwsgi/apps-enabled/carom.ini +popd +``` From 94cc7787c9d84a9b6d1f0e2a16c424d113017885 Mon Sep 17 00:00:00 2001 From: Robert Einsle Date: Tue, 19 Feb 2019 14:28:42 +0100 Subject: [PATCH 06/25] update Install docu --- INSTALL.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 94308f7..401d810 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -151,9 +151,11 @@ server { Create it for /etc/ngin/sites-available/carom... and carom-int... and link it to /etc/ngin/sites-enabled/ +Path to certificates must be modified. + systemctl restart nginx -- [ ] Create update.sh in carom and carom-int root mkdir +- [ ] Create update.sh in carom and carom-int root dir ``` pushd /srv/carom/ From fcf37fe0b3458198b86b1c92a89a05b2c26998f9 Mon Sep 17 00:00:00 2001 From: Robert Einsle Date: Tue, 19 Feb 2019 15:58:25 +0100 Subject: [PATCH 07/25] Update INSTALL.md --- INSTALL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 401d810..b4f8287 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,8 +1,8 @@ # Preparing - [ ] Install and configure Mailsystem (postfix) so it is possible to send mails -- [ ] apt install python3 python3-pip python3-venv python3-virtualenv -- [ ] apt install uwsgi uwsgi-plugin-python3 +- [ ] ```apt install python3 python3-pip python3-venv python3-virtualenv``` +- [ ] ```apt install uwsgi uwsgi-plugin-python3``` - [ ] Install and configure mariadb-server - [ ] Install and configure nginx und selfencrypt From 0239368e69c47afcc36aeae2244d4aaa91b12949 Mon Sep 17 00:00:00 2001 From: Robert Einsle Date: Tue, 19 Feb 2019 16:00:34 +0100 Subject: [PATCH 08/25] Update INSTALL.md --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index b4f8287..33556be 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -3,7 +3,7 @@ - [ ] Install and configure Mailsystem (postfix) so it is possible to send mails - [ ] ```apt install python3 python3-pip python3-venv python3-virtualenv``` - [ ] ```apt install uwsgi uwsgi-plugin-python3``` -- [ ] Install and configure mariadb-server +- [ ] Install and configure mariadb-server ```mysql_secure_installation``` - [ ] Install and configure nginx und selfencrypt From d976d6b6537762459695a0d7365861eb9d88f568 Mon Sep 17 00:00:00 2001 From: Robert Einsle Date: Wed, 20 Feb 2019 08:12:15 +0100 Subject: [PATCH 09/25] update installation instruction --- INSTALL.md | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 33556be..1c5be7d 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,10 +1,10 @@ # Preparing - [ ] Install and configure Mailsystem (postfix) so it is possible to send mails -- [ ] ```apt install python3 python3-pip python3-venv python3-virtualenv``` -- [ ] ```apt install uwsgi uwsgi-plugin-python3``` +- [ ] Install python ```apt install python3 python3-pip python3-venv python3-virtualenv``` +- [ ] Install uwsgi ```apt install uwsgi uwsgi-plugin-python3``` - [ ] Install and configure mariadb-server ```mysql_secure_installation``` -- [ ] Install and configure nginx und selfencrypt +- [ ] Install and configure nginx und let's encrypt or similar # Installation @@ -22,7 +22,7 @@ GRANT ALL PRIVILEGES ON carom-int.* TO 'carom-int'@'localhost'; FLUSH PRIVILEGES; ``` -Passphrases should be replaced by usefull characters +Passphrases should be replaced by useful characters - [ ] Create systemd unit file for uwsgi (/etc/systemd/system/uwsgi.service): @@ -42,6 +42,14 @@ NotifyAccess=all WantedBy=multi-user.target ``` +- [ ] Reread systemd configs for uwsgi + +``` +systemd daemon-reload +systemd enable uswgi.service +systemd restart uswgi.service +``` + - [ ] Checkout carom ``` @@ -78,7 +86,7 @@ pipenv run python manage.py collectstatic Do it for /srv/carom and /srv/carom-int -Create Superuser Accounts using: +- [ ] Create Superuser Accounts using: ``` pipenv run python manage.py createsuperuser @@ -99,7 +107,7 @@ vacuum = true uid = www-data gid = www-data workers = 2 -#socket = /run/uwsgi/app/carom.socket +socket = /run/uwsgi/app/carom.socket chmod-socket = 660 log-date = true ``` @@ -107,7 +115,9 @@ log-date = true Create it for /etc/uwsgi/apps-available/carom.ini and carom-int.ini and link it to /etc/uwsgi/apps-enabled/ -systemctl restart uwsgi +``` +systemctl restart uwsgi.service +``` Show at syslog for errors and fix it. @@ -153,7 +163,9 @@ to /etc/ngin/sites-enabled/ Path to certificates must be modified. +``` systemctl restart nginx +``` - [ ] Create update.sh in carom and carom-int root dir @@ -166,3 +178,5 @@ pipenv run ./manage.py collectstatic --noinput touch /etc/uwsgi/apps-enabled/carom.ini popd ``` + +Path to uwsgi config file (in apps-enabled) musst be matching. \ No newline at end of file From 351ec5a09076c4cc08d0b9aa212ba0999fdea94d Mon Sep 17 00:00:00 2001 From: Robert Einsle Date: Wed, 20 Feb 2019 18:12:53 +0100 Subject: [PATCH 10/25] Update INSTALL.md --- INSTALL.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 1c5be7d..9b92da2 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -45,9 +45,9 @@ WantedBy=multi-user.target - [ ] Reread systemd configs for uwsgi ``` -systemd daemon-reload -systemd enable uswgi.service -systemd restart uswgi.service +systemctl daemon-reload +systemctl enable uswgi.service +systemctl restart uswgi.service ``` - [ ] Checkout carom From b4d28a6f97ec05b14a9c3d624965d48843cd05a0 Mon Sep 17 00:00:00 2001 From: Dennis Reinwald Date: Sat, 23 Feb 2019 22:46:08 +0100 Subject: [PATCH 11/25] Update INSTALL.md --- INSTALL.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 9b92da2..7cb8a88 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -16,9 +16,9 @@ CREATE DATABASE carom DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; CREATE USER 'carom'@'localhost' IDENTIFIED BY 'xxx'; GRANT ALL PRIVILEGES ON carom.* TO 'carom'@'localhost'; -CREATE DATABASE carom-int DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; -CREATE USER 'carom-int'@'localhost' IDENTIFIED BY 'xxx'; -GRANT ALL PRIVILEGES ON carom-int.* TO 'carom-int'@'localhost'; +CREATE DATABASE carom_int DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; +CREATE USER 'carom_int'@'localhost' IDENTIFIED BY 'xxx'; +GRANT ALL PRIVILEGES ON carom-int.* TO 'carom_int'@'localhost'; FLUSH PRIVILEGES; ``` From 80445ef2c26f0139d298252a99264193285e7bc2 Mon Sep 17 00:00:00 2001 From: Dennis Reinwald Date: Sat, 23 Feb 2019 22:58:52 +0100 Subject: [PATCH 12/25] Update INSTALL.md --- INSTALL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 7cb8a88..b63ff8a 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -16,8 +16,8 @@ CREATE DATABASE carom DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; CREATE USER 'carom'@'localhost' IDENTIFIED BY 'xxx'; GRANT ALL PRIVILEGES ON carom.* TO 'carom'@'localhost'; -CREATE DATABASE carom_int DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; -CREATE USER 'carom_int'@'localhost' IDENTIFIED BY 'xxx'; +CREATE DATABASE carom-int DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; +CREATE USER 'carom-int'@'localhost' IDENTIFIED BY 'xxx'; GRANT ALL PRIVILEGES ON carom-int.* TO 'carom_int'@'localhost'; FLUSH PRIVILEGES; ``` From 56143c343688f4805c6c04ddc7963988c893915d Mon Sep 17 00:00:00 2001 From: Dennis Reinwald Date: Sat, 23 Feb 2019 23:02:25 +0100 Subject: [PATCH 13/25] Update INSTALL.md --- INSTALL.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index b63ff8a..f3832ce 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -16,9 +16,9 @@ CREATE DATABASE carom DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; CREATE USER 'carom'@'localhost' IDENTIFIED BY 'xxx'; GRANT ALL PRIVILEGES ON carom.* TO 'carom'@'localhost'; -CREATE DATABASE carom-int DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; -CREATE USER 'carom-int'@'localhost' IDENTIFIED BY 'xxx'; -GRANT ALL PRIVILEGES ON carom-int.* TO 'carom_int'@'localhost'; +CREATE DATABASE carom_int DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; +CREATE USER 'carom_int'@'localhost' IDENTIFIED BY 'xxx'; +GRANT ALL PRIVILEGES ON carom_int.* TO 'carom_int'@'localhost'; FLUSH PRIVILEGES; ``` From b4319bba5f6cdf6cd6fee77e2d2737bd91f7735c Mon Sep 17 00:00:00 2001 From: Dennis Reinwald Date: Sat, 23 Feb 2019 23:07:41 +0100 Subject: [PATCH 14/25] Update INSTALL.md --- INSTALL.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index f3832ce..9b92da2 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -16,9 +16,9 @@ CREATE DATABASE carom DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; CREATE USER 'carom'@'localhost' IDENTIFIED BY 'xxx'; GRANT ALL PRIVILEGES ON carom.* TO 'carom'@'localhost'; -CREATE DATABASE carom_int DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; -CREATE USER 'carom_int'@'localhost' IDENTIFIED BY 'xxx'; -GRANT ALL PRIVILEGES ON carom_int.* TO 'carom_int'@'localhost'; +CREATE DATABASE carom-int DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; +CREATE USER 'carom-int'@'localhost' IDENTIFIED BY 'xxx'; +GRANT ALL PRIVILEGES ON carom-int.* TO 'carom-int'@'localhost'; FLUSH PRIVILEGES; ``` From 600c23c9a41995976847ecf1ea700b41804bf93f Mon Sep 17 00:00:00 2001 From: Dennis Reinwald Date: Sat, 23 Feb 2019 23:21:44 +0100 Subject: [PATCH 15/25] Update INSTALL.md --- INSTALL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 9b92da2..326ab55 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -46,8 +46,8 @@ WantedBy=multi-user.target ``` systemctl daemon-reload -systemctl enable uswgi.service -systemctl restart uswgi.service +systemctl enable uwsgi.service +systemctl restart uwsgi.service ``` - [ ] Checkout carom From 9f2ef3c556705ada06532fc4cf64a2d7d99dcbb6 Mon Sep 17 00:00:00 2001 From: Dennis Reinwald Date: Sat, 23 Feb 2019 23:25:46 +0100 Subject: [PATCH 16/25] Update INSTALL.md --- INSTALL.md | 1 + 1 file changed, 1 insertion(+) diff --git a/INSTALL.md b/INSTALL.md index 326ab55..392e31c 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -5,6 +5,7 @@ - [ ] Install uwsgi ```apt install uwsgi uwsgi-plugin-python3``` - [ ] Install and configure mariadb-server ```mysql_secure_installation``` - [ ] Install and configure nginx und let's encrypt or similar +- [ ] Install git ```apt install git``` # Installation From 2d6574807f8e38d37f4db6eda0965a1a9f97024e Mon Sep 17 00:00:00 2001 From: Robert Einsle Date: Mon, 25 Feb 2019 09:19:43 +0100 Subject: [PATCH 17/25] Update INSTALL.md --- INSTALL.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/INSTALL.md b/INSTALL.md index 392e31c..238fc53 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -69,6 +69,22 @@ cd .. Pip3 install –upgrade pipenv ``` +- [ ] Install mysqlclient + +apt install libmariadbclient-dev + +In environments carom run + +``` +pipenv install mysqlclient +``` + +``` +git checkout -- Pipfile +git checkout -- Pipfile.locl +git status +``` + - [ ] Create caromserver/local_settings.py for both environments: ``` From a2968f3e47fdbbc2a9ad548bc65b9ff08b8b411d Mon Sep 17 00:00:00 2001 From: Robert Einsle Date: Mon, 25 Feb 2019 09:21:04 +0100 Subject: [PATCH 18/25] Update INSTALL.md --- INSTALL.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 238fc53..338ccd4 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -66,7 +66,7 @@ cd .. - [ ] Install pipenv ``` -Pip3 install –upgrade pipenv +pip3 install –upgrade pipenv ``` - [ ] Install mysqlclient @@ -80,8 +80,7 @@ pipenv install mysqlclient ``` ``` -git checkout -- Pipfile -git checkout -- Pipfile.locl +git checkout -- Pipfile Pipfile.lock git status ``` From 46fc81547984c0ffd03a97236045ae84d71e946f Mon Sep 17 00:00:00 2001 From: Dennis Reinwald Date: Mon, 25 Feb 2019 09:21:32 +0100 Subject: [PATCH 19/25] Update INSTALL.md --- INSTALL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 338ccd4..3fad4d7 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -17,9 +17,9 @@ CREATE DATABASE carom DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; CREATE USER 'carom'@'localhost' IDENTIFIED BY 'xxx'; GRANT ALL PRIVILEGES ON carom.* TO 'carom'@'localhost'; -CREATE DATABASE carom-int DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; +CREATE DATABASE `carom-int` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; CREATE USER 'carom-int'@'localhost' IDENTIFIED BY 'xxx'; -GRANT ALL PRIVILEGES ON carom-int.* TO 'carom-int'@'localhost'; +GRANT ALL PRIVILEGES ON `carom-int`.* TO 'carom-int'@'localhost'; FLUSH PRIVILEGES; ``` From bb736468db5fd90484bbd5d85667128a26e98e65 Mon Sep 17 00:00:00 2001 From: Robert Einsle Date: Mon, 25 Feb 2019 09:22:26 +0100 Subject: [PATCH 20/25] Update INSTALL.md --- INSTALL.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/INSTALL.md b/INSTALL.md index 3fad4d7..002d5f2 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -71,7 +71,9 @@ pip3 install –upgrade pipenv - [ ] Install mysqlclient +``` apt install libmariadbclient-dev +``` In environments carom run From 64eb0eb64e39acdb1a788cab0d28b2502c52364f Mon Sep 17 00:00:00 2001 From: Robert Einsle Date: Mon, 25 Feb 2019 09:34:15 +0100 Subject: [PATCH 21/25] Update INSTALL.md --- INSTALL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 002d5f2..5a1771a 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -125,7 +125,7 @@ vacuum = true uid = www-data gid = www-data workers = 2 -socket = /run/uwsgi/app/carom.socket +socket = /run/uwsgi/carom.socket chmod-socket = 660 log-date = true ``` @@ -143,7 +143,7 @@ Show at syslog for errors and fix it. ``` upstream socket_carom { - server unix:///run/uwsgi/app/carom.sock; + server unix:///run/uwsgi/carom.sock; } server { From f58c238ef638e570d7c22bbd8e48b5d14074943e Mon Sep 17 00:00:00 2001 From: Robert Einsle Date: Mon, 25 Feb 2019 09:47:52 +0100 Subject: [PATCH 22/25] Update INSTALL.md --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 5a1771a..92d8115 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -143,7 +143,7 @@ Show at syslog for errors and fix it. ``` upstream socket_carom { - server unix:///run/uwsgi/carom.sock; + server unix:///run/uwsgi/carom.socket; } server { From e043067b3996c525599de75ea7321a65ea902a16 Mon Sep 17 00:00:00 2001 From: Robert Einsle Date: Mon, 25 Feb 2019 10:01:06 +0100 Subject: [PATCH 23/25] Update INSTALL.md --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 92d8115..129e480 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -167,7 +167,7 @@ server { alias /srv/carom/media; } location /static { - alias /srv/carom/static; + alias /srv/carom/staticfiles; } location / { uwsgi_pass socket_carom; From df5b99ed568703fdd3dbf693aeca28f23bd06b76 Mon Sep 17 00:00:00 2001 From: Robert Einsle Date: Mon, 25 Feb 2019 10:04:56 +0100 Subject: [PATCH 24/25] Update INSTALL.md --- INSTALL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 129e480..5f4bb7e 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -191,8 +191,8 @@ systemctl restart nginx pushd /srv/carom/ git pull pipenv update -pipenv run ./manage.py migrate -pipenv run ./manage.py collectstatic --noinput +pipenv run python manage.py migrate +pipenv run python manage.py collectstatic --noinput touch /etc/uwsgi/apps-enabled/carom.ini popd ``` From 55b50f302c3dc01b5125294095e54411e2e0169a Mon Sep 17 00:00:00 2001 From: Robert Einsle Date: Mon, 25 Feb 2019 15:52:58 +0100 Subject: [PATCH 25/25] add favicon --- static/img/billiard.ico | Bin 0 -> 67646 bytes templates/_base.html | 1 + 2 files changed, 1 insertion(+) create mode 100644 static/img/billiard.ico diff --git a/static/img/billiard.ico b/static/img/billiard.ico new file mode 100644 index 0000000000000000000000000000000000000000..f60333f05de3bc42bd6915f5e7c920bc234042b5 GIT binary patch literal 67646 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 aSjpr>L9cu2L2BJJ!dkDjcBHYD$o~grh|5|4 literal 0 HcmV?d00001 diff --git a/templates/_base.html b/templates/_base.html index f2551e2..911ba28 100644 --- a/templates/_base.html +++ b/templates/_base.html @@ -8,6 +8,7 @@ + {% block header %} {% endblock %}