- Python 3.*
- PostgresSQL
- Nodejs This project was bootstrapped with Create React App.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You can just run docker-compose up -d --build in main folder to have all setup ready to development. Also you can edit and live view your changes in both front and backend apps.
In order to run this application, you need to have npm (Node Package Manager) installed. It comes with Node.js.
- Node.js and NPM - Installation guide for Node.js and NPM
- Python 3.6 or higher
In the Pop-Grupa-A-Frontend project directory, you can run:
Installs required dependencies for starting up the project. (it might take a while, so wait patiently)
After installing all dependencies, run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
I advise to go through tutorial linked below, which I based flask API.
Python guide I followed for creating basic flask api structure.
In the Pop-Grupa-A-Backend project directory, you can run:
Installs required dependencies for starting up the project. (it might take a while, so wait patiently)
Next, when you have your local postgres database balticlsc created with user admin and password 123456 run:
After installing all dependencies, run:
Runs the app in the development mode.
Open http://localhost:5000 to view it in the browser.
API will reload if you make edits.
You will also see any lint errors in the console.
If you have pgadmin4 installed on your machine, launch it and create a new server with information from docker-compose.yml file.
- Port: 5433
- IP: 127.0.0.1
- Login: admin
- password: 123456 Then you will be able to browse database through pgadmin4 manager.
Docker for Windows Installation
To create and run docker images follow instruction below:
- Launch Powershell IDE or different console
- Navigate to directory containing 2 projects with docker-compose.yml file
- In console run
docker-compose up -d --build- it will build images and spin up the containers. They will be accessed on localhost:3000 and localhost:5000. Any changes made in both projects will be automatically refreshed in containers (hot-reloading)
Migration to database in entrypoint.sh might not be applied due to windows line endings. To fix that, you may have to go inside API container and run the script automatically.
docker exec -it backend-pop sh- this command moves you inside the containerpython manage.py db upgrade- runs migration to postgres database
If you want to browse docker-created database, run those commands:
docker exec -it postgres shpsql -U admin balticlsc