UMLCloudComputing / UniPath.io

UniPath.io is a full-stack web application that allows users to create, plan, and share their class schedules for their entire degree program.
https://www.unipath.io
MIT License
9 stars 19 forks source link

Add Docker to the Project #60

Closed MartinMarwad closed 8 months ago

MartinMarwad commented 8 months ago

Overall Review of Changes:

This PR introduces Docker support to our project, allowing developers to easily set up and tear down their development environments. We've added a Dockerfile that describes the containerized environment for our Next.js application and a docker-compose.yml file that simplifies the management of our Docker container.

Reason for Change:

Introducing Docker to our project streamlines the setup process for new developers and ensures a consistent development environment across all machines. This reduces the "it works on my machine" issues and ensures that everyone is working in a similar environment. Additionally, Docker provides an added layer of isolation, making it easier to manage dependencies and configurations.

Tested:


How to use the new Docker setup:

  1. Building and Starting the Container:

    Navigate to the project directory and run:

    docker-compose up

    This command does the following:

    • Builds the Docker image based on the provided Dockerfile (if not already built).
    • Starts a container instance of the image.
    • Maps port 3000 of the host machine to port 3000 of the container.
    • Mounts the current directory on the host machine to the /app directory in the container, ensuring real-time reflection of changes.

    Once the command is executed, the Next.js application will start, and you can access it in your browser at http://localhost:3000.

  2. Stopping the Container:

    To stop the running container and remove it, simply run:

    docker-compose down

    This command stops the container and removes it, ensuring a clean environment for the next time you run docker-compose up.

github-actions[bot] commented 8 months ago

Preview branch generated at https://martin-feat-docker.d2zs7m7q4yzmc.amplifyapp.com

ultralapse commented 8 months ago

lgtm