Semester project for the relational databses class.
To run the app:
npm run serve
- Python 3.9
Create a virtual environment
Install dependencies from requirements.txt
To run the app (Make sure the database is up and running):
export FLASK_APP=hello
flask run
- Docker
- Docker Compose
To setup the database:
** Make sure that mysql is not running on port 3306 before starting the container **
-
Open a terminal in the
database
folder -
Run the following command:
docker compose up
To stop the database, you can exit in the terminal with CTRL+C and run the following command:
docker compose down
- Docker
- Docker Compose
To setup the server for the first time:
-
Open a terminal in the
gitserver
folder -
Run the following command:
docker compose build
docker compose up -d
-
Go in the
backend
folder and in theutil
folder. -
Run the
getContainerId
python script to get the container id of the git server (make sure it is the only one running) -
Copy the id into the .env file. The file should look like this:
GITSERVER_CONTAINER=thecontainerid
-
Run the
populateServer
python script to populate the repositories. -
Steps 3 to 6 are only for the first time. You can start back the container manually or with the
docker compose up -d
after.
To stop the server, you can run the command:
docker compose down
To clone a repository run the following command:
git clone http://localhost:8000/username/repo.git