Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Docker Setup for EduAid Project #83

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ParagGhatage
Copy link

Description:

This PR introduces Docker setup for the EduAid project, which includes Docker configurations for both the backend and frontend, along with necessary updates to the project structure and documentation.

Files Changed:

  1. docker-compose.yml:

    • Added a docker-compose.yml file to simplify the process of building and running both frontend and backend containers simultaneously.
    • The configuration includes services for both the frontend (React app) and backend (Flask app), allowing easy container orchestration.
  2. Dockerfile.backend:

    • Added a Dockerfile for the backend service. This Dockerfile sets up a Flask environment for the backend, installs dependencies, and configures the server to run within a container.
  3. Dockerfile.webapp:

    • Added a Dockerfile for the frontend service. This Dockerfile builds the React application, installs dependencies, and serves the app within a container.
  4. .dockerignore:

    • Added a .dockerignore file to ensure that unnecessary files (like node_modules, .git, etc.) are not included in the Docker images, improving efficiency during the build process.
  5. Moved requirements.txt:

    • Moved the requirements.txt file from the root directory to the backend/ directory to reflect a more organized structure, keeping dependencies specific to the backend service.
  6. Updated README.md:

    • Added detailed Docker setup instructions to the README.md file to guide users through the process of building, running, and troubleshooting the Dockerized EduAid project.
    • Included troubleshooting tips, such as using docker system prune -a to resolve any potential issues.

New Features/Enhancements:

  • Dockerized Environment:
    • The project is now fully Dockerized, allowing for easy setup and deployment of the EduAid app, both for development and production environments.
    • The docker-compose.yml file enables both backend and frontend to run as Docker containers without manual setup for each service.

Notes:

-The Docker setup provides a fully isolated environment for both backend and frontend, ensuring consistency across different environments.
-The README.md has been updated with a comprehensive guide for setting up and troubleshooting the Dockerized version of EduAid.

@Roaster05
Copy link
Contributor

@ParagGhatage ig you have missed the build command for the chrome-extensions frontend which is in /extension

@ParagGhatage
Copy link
Author

ParagGhatage commented Dec 22, 2024

@ParagGhatage ig you have missed the build command for the chrome-extensions frontend which is in /extension

@Roaster05 ,
According to the project Readme, we have to load /dist folder in chrome extension developer mode, which needs to be generated by running npm run build in project /extension directory.
https://github.com/AOSSIE-Org/EduAid?tab=readme-ov-file#load-the-extension-in-chrome

So, it is not possible to include it in docker setup. Also its not memory efficient operation to run all three containers (backend, web, extension).

when developers add their manually generated extension /dist folder to browser, extension will be able to send request whenever backend is running.

@Roaster05
Copy link
Contributor

@ParagGhatage we can include the build command in the docker file , we just have to include the build step we dont actually need to run the container through the docker compose , because that will have to be manually loaded by the user in the chrome extension store, so include that as well

@ParagGhatage
Copy link
Author

@ParagGhatage we can include the build command in the docker file , we just have to include the build step we dont actually need to run the container through the docker compose , because that will have to be manually loaded by the user in the chrome extension store, so include that as well

Hey @Roaster05 ,
I have added build command for browser extension, just as you mentioned.
Please review the changes and get this PR merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants