In order to run the app, you need to have Docker desktop installed to initialize the database instance as well as seed the database with the dockerfile
in the main directory. Once you have Docker desktop installed, follow the steps below.
To run the application, follow each section in order to successfully run the app.
- cd into main directory
cd ConcertCopper
- create docker image and then create docker container
docker build -t postgres-db ./
docker run -d --name postgres-fast -p 6000:5432 postgres-db
The docker container should be running and the tables should be filled. To check this, type into the terminal
psql -U postgres -d fastdb
\dt
All the relations should be visible after running the second command.
- cd into backend folder
cd backend
- create a python virtual environment to run all the necessary packages
python3.10 -m venv venv
- activate the virtual environment depending if you're on mac or windows
Mac
source venv/bin/activate
Windows
venv\Scripts\activate
- install all dependencies
pip install -r requirements.txt
- run the FastAPI app
uvicorn main:app
- cd into frontend folder
cd frontend
- install all dependencies
yarn install
- run the app
yarn dev
After following each section in order, the application should be running and you can check it out at http://localhost:3000
. To test admin functionality.
Check the user table and use an existing account that has the admin_flag set to true.