Server side of an application of an Aircraft Technical Log
Project description
Atlantic
This program is the sever side of the Atlantic app. It gives you a restful api.
Installation on debian 10 (or ubuntu 20.04) for production
The recommended way to install it is to use a virtual environment.
-
Install package
apt install -y pipx apache2 libapache2-mod-wsgi-py3 mariadb-server python3-dev libmariadb-dev libmariadbclient-dev build-essential
-
Create and configure database
mysql -u root -p CREATE DATABASE atlantic CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE USER 'aristide'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON atlantic . * TO 'aristide'@'localhost'; FLUSH PRIVILEGES; quit;
-
Create a user and log it
adduser aristide su - aristide
-
Install atlantic_server
pipx install atlantic_server
-
In the user home directory, create a conf.py file
nano ~/conf.py
and paste following parameters (with adjust):
SECRET_KEY = "enter here a lot of randoms letters and numbers here" DEBUG = True DATABASES = { "default": { "ENGINE": "django.db.backends.mysql", "NAME": "aristide", "USER": "atlantic", "PASSWORD": "password", } } MEDIA_ROOT = "/home/aristide/www/media/"
-
Configure Django app
atlantic_server makemigrations com atl smd atlantic_server migrate atlantic_server collectstatic atlantic_server createsuperuser
-
Configure Apache2
- Return to root user
exit
- Create a new file
nano /etc/apache2/site-available/atlantic.conf
- Paste following parameters (with adjust):
<VirtualHost *:80> ServerName url.for.your.site ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined DocumentRoot /home/aristide/www/vue/ <Directory /home/aristide/.local/pipx/venvs/atlantic-server/lib/python3.7/site-packages/atlantic_server> <Files wsgi.py> Require all granted </Files> </Directory> WSGIPassAuthorization On WSGIDaemonProcess aristide python-home=/home/aristide/.local/pipx/venvs/atlantic-server python-path=/home/aristide WSGIProcessGroup aristide WSGIScriptAlias /admin /home/aristide/.local/pipx/venvs/atlantic-server/lib/python3.7/site-packages/atlantic_server/wsgi.py/admin WSGIScriptAlias /api /home/aristide/.local/pipx/venvs/atlantic-server/lib/python3.7/site-packages/atlantic_server/wsgi.py/api <Directory /home/aristide/www/> Require all granted </Directory> Alias /media/ /home/aristide/www/media/ Alias /static/ /home/aristide/www/static/ </VirtualHost>
The DocumentRoot directory is the place where you upload the atlantic_client side.
- Save and close file
- Return to root user
-
Enabled site for apache
a2dissite * a2ensite atlantic systemctl reload apache2
-
It is recommended to secure the access of your site with a certificate...
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file atlantic_server-0.3.5.tar.gz
.
File metadata
- Download URL: atlantic_server-0.3.5.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c096163aee01604e1ef842f369e83527f074a8f7a7317486550af237526e252 |
|
MD5 | 89b2bbbe9651fb1183db2fbb8989e301 |
|
BLAKE2b-256 | da9cd416fdbd773242d07f229cbb9889caed60d857ab4171064176d2e3b48b84 |
File details
Details for the file atlantic_server-0.3.5-py3-none-any.whl
.
File metadata
- Download URL: atlantic_server-0.3.5-py3-none-any.whl
- Upload date:
- Size: 20.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a10975543c04ad25e3e87126760ab805719013033064ae4973a40979e5e4236b |
|
MD5 | 904f609dcead610f823eaaf0791366cf |
|
BLAKE2b-256 | 42f3e2bcb05b2298645e74a4429a2ba092c2a924b03fdb050c36a13cf215bf31 |