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.pyand 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...
Metadata
Release files for atlantic-server 0.3.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| atlantic_server-0.3.5.tar.gz | 15.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| atlantic_server-0.3.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.4 kB
Release files / atlantic_server-0.3.5.tar.gz
| Download URL | atlantic_server-0.3.5.tar.gz |
|---|---|
| Size | 15.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9c096163aee01604e1ef842f369e83527f074a8f7a7317486550af237526e252
|
|
BLAKE2b-256 checksum How to use checksums |
da9cd416fdbd773242d07f229cbb9889caed60d857ab4171064176d2e3b48b84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / atlantic_server-0.3.5-py3-none-any.whl
| Download URL | atlantic_server-0.3.5-py3-none-any.whl |
|---|---|
| Size | 20.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a10975543c04ad25e3e87126760ab805719013033064ae4973a40979e5e4236b
|
|
BLAKE2b-256 checksum How to use checksums |
42f3e2bcb05b2298645e74a4429a2ba092c2a924b03fdb050c36a13cf215bf31
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|