Standalone Installation(no container)
Ubuntu-20.04, Python-3.8, Django-3.2.5, PostgreSql-12.7, PIP packages
VENV the python virtual environment
The .venv naming is just my style. You can name it as your choice. Choosing the .venv
name has the benefits for making the directory hidden, as this is excluded from vcs(should be in gitignore). So keeping it hidden makes convenient.
Inside project root: mkdir .venv
Install venv: python3 -m venv .venv
Activate: source .venv/bin/activate
Install Django: python -m pip install Django
Database: Postgresql
apt update
apt install postgresql postgresql-contrib postgresql-client
To have some basic understanding of postgresql roles, ident login and psql shell usage, check the attached link below.
Create Role and Database:
our role and database will be named freightforward(as example)
sudo -u postgres createuser --interactive
sudo -u postgres createdb freightforward
Now create a linux user with same name for ident based authentication:
sudo adduser freightforward
When asked for password, we used a sample password freightforward
Test connection to the database with the user:
sudo -u freightforward psql
PIP: psycopg2
psycopg2(PostgreSQL driver) depends on python3-dev and libpq-dev
. So install them. sentry-sdk
depends on(automatically installed) certifi and urllib3
apt install python3-dev libpq-dev
pip install psycopg2
PIP: django-crispy-forms
Needed in seaimport forms:
pip install django-crispy-forms
PIP: django-filter
Required in packages/seaimport/filters.py.
pip install django-filter
Environment Variables
check in the related section.