Open Evomatic opened 7 months ago
@tds455 Note: I setup the django (backend) application with pipenv
even though we plan to containerize. In case development ever needs to happen outside the container we will at least have another way to guarantee consistent development. Also pipenv
should make development a bit more easier since we no longer have to use pip
or virtualenv
separately. Easier to manager.
Full structure view
nutrient-checker
├── README.md
├── backend
│ ├── Pipfile
│ ├── Pipfile.lock
│ ├── asgi.py
│ ├── backend
│ │ ├── __init__.py
│ │ ├── settings.py
│ │ ├── urls.py
│ │ └── wsgi.py
│ ├── db.sqlite3
│ └── manage.py
└── frontend
├── index.html
├── jsconfig.json
├── package-lock.json
├── package.json
├── public
│ └── vite.svg
├── src
│ ├── assets
│ ├── index.jsx
│ └── style.css
└── vite.config.js
This is fine - It'll make development much easier if we only containerise when we push to main. Best to just use venv / pipenv for local development.
I believe sqlite3 is the default local db for django. We'll need to update manage.py to point towards a local postgres container instead.
Yeah, we will need to make quite a few configuration adjustments. Of course we won't be relying on sqlite3. It is better to have a dedicated database layer that is separate from the django api/server. By doing so we will reduce any risk of server being loaded. So this is where PostgreSQL container will come in :)
Setup the basic structure of the application as followed.