Welcome to the Diploma Project, a comprehensive system designed for my university diploma. This repository serves as the main aggregate project that orchestrates both the frontend and backend components of the application using Docker.
The project consists of the following key directories:
diploma_backend/: Contains the backend service, implemented with FastAPI.diploma_frontend/: Contains the frontend service, implemented with React.docker-compose.yml: Used to orchestrate the backend and frontend services for seamless operation.
To run this project, ensure you have the following installed on your system:
- Docker: Install Docker
- Docker Compose: Comes bundled with Docker Desktop or can be installed separately. Install Docker Compose
git clone --recursive https://github.com/yourusername/diploma.git
cd diploma-
Note: If you forgot to clone with
--recursive(to include submodules), you can initialize and update the submodules afterward:git submodule update --init --recursive
To start both the backend and frontend services, simply run:
docker-compose up --buildThis command will:
- Build the Docker images for the backend and frontend services.
- Start the containers and link them together in a shared network.
Once the services are running, you can access them at the following URLs:
- Frontend (React): http://localhost:3000
- Backend (FastAPI): http://localhost:8000/docs
The backend provides an interactive Swagger documentation interface at /docs.
For local development, you can make changes to the code in the respective directories (diploma_backend or diploma_frontend). Docker will automatically reload the services if you set up hot-reloading properly.
If you make significant changes to the code or dependencies, rebuild the services with:
docker-compose up --builddiploma/
├── diploma_backend/ # Backend service (FastAPI)
│ ├── Dockerfile
│ ├── main.py
│ ├── requirements.txt
│ └── .env
├── diploma_frontend/ # Frontend service (React)
│ ├── Dockerfile
│ ├── src/
│ └── package.json
├── docker-compose.yml # Orchestrates backend and frontend
└── README.md # This file
-
Docker Issues:
- Make sure Docker and Docker Compose are installed and running.
- If the containers fail to start, check the logs for more details:
docker-compose logs
-
Port Conflicts:
- Ensure ports
3000(frontend) and8000(backend) are not in use by other applications.
- Ensure ports
-
Submodules Not Updated:
- If the submodules are not initialized, run:
git submodule update --init --recursive
- If the submodules are not initialized, run:
Contributions to the project are welcome! Feel free to fork this repository, make changes, and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.