Skip to content

How to Run the Backend and Frontend

NightBlackMare edited this page Sep 6, 2024 · 2 revisions

How to Run the Backend and Frontend with Docker Compose

This guide explains how to start the backend and frontend services using Docker Compose. Make sure Docker and Docker Compose are installed on your machine before proceeding.

Prerequisites

  1. Docker: Ensure Docker is installed. You can download Docker here.
  2. Docker Compose: Docker Compose should be included with Docker Desktop, but if you need to install it separately, follow the instructions here.

Running the application

To start the services, follow these steps:

  1. Open a terminal.

  2. Navigate to your project’s root directory if not already there.

  3. Run the following command:

    docker compose up --build

Explanation

  • docker compose: The command used to run Docker Compose.
  • up: Starts and runs the services defined in the Docker Compose file.
  • --build: Rebuilds the images and containers before starting.

Stopping the Services

To stop the services, you can use the following command in their respective terminals or open a new terminal and run:

docker compose down