Go to file
Bartosz Karwacki 52649a0beb Lint
2022-01-23 19:07:02 +01:00
backend Lint 2022-01-23 19:07:02 +01:00
docker first commit 2021-12-04 21:41:57 +01:00
frontend Merge branch 'master' of git.wmi.amu.edu.pl:s470611/Systemy-rozmyte-sql 2022-01-23 19:06:26 +01:00
.gitignore first commit 2021-12-04 21:41:57 +01:00
dev-requirements.txt first commit 2021-12-04 21:41:57 +01:00
dev.db.env first commit 2021-12-04 21:41:57 +01:00
dev.env endpoint, frontend 2022-01-15 17:40:16 +01:00
docker-compose.yml first commit 2021-12-04 21:41:57 +01:00
insert-data.sql Fixes for settings, insert scripts, table header and fuzzy logic 2022-01-23 18:57:40 +01:00
Makefile first commit 2021-12-04 21:41:57 +01:00
README.md first commit 2021-12-04 21:41:57 +01:00
requirements.txt fix response 2022-01-23 12:15:33 +01:00

Systemy rozmyte

Frontend URL

http://localhost:8080/

Backend URL

http://localhost:8000/

Run in Docker

You need to install Docker and Docker-compose

Running in docker

To build:

make build

To run:

make up

Locally

Requirements

  • Python 3.10
  • PostgreSQL
  • Node v15.13.0

Create virtual environment

python3 -m venv venv
. venv/bin/activate

Install requirements:

make install

Create .env file in backend directory & copy variables:

SECRET_KEY=SECRET_KEY
DEBUG=1
ALLOWED_HOSTS=localhost 127.0.0.1
SQL_HOST=localhost
SQL_PORT=5432
POSTGRES_PASSWORD=sysrozm
POSTGRES_DB=sysrozm
POSTGRES_USER=sysrozm

Create database:

sudo -u postgres psql
CREATE DATABASE sysrozm;
CREATE USER sysrozm WITH PASSWORD 'sysrozm';
GRANT ALL PRIVILEGES ON DATABASE sysrozm TO sysrozm;

Allow user to create databases:

ALTER USER sysrozm CREATEDB;

Run

(cd backend && python3 manage.py runserver)
(cd frontend && npm run serve)

Install pre-commit

  1. Run command in project directory
make install-pre-commit

Run linters

  1. Run command in project directory
make lint