> For the complete documentation index, see [llms.txt](https://epitech-area.gitbook.io/area/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://epitech-area.gitbook.io/area/deployment.md).

# Project Deployment Guide

This guide will walk you through the process of deploying the project using Docker and Docker Compose.

## Prerequisites

Before you begin, ensure you have the following installed:

* [Docker](https://docs.docker.com/get-docker/)
* [Docker Compose](https://docs.docker.com/compose/install/)

## Configuration

1. Clone the project repository to your local machine.
2. Navigate to the root of the project directory.
3. Create a `.env` file in the root of your project directory with the following environment variables:

```env
MONGO_USERNAME=
MONGO_PASSWORD=
MONGO_DATABASE=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENTSECRET=
REDIRECT_GOOGLE_URL=
CLIENT_URL=
TOKEN_SECRET=
DISCORD_CLIENT_ID=
DISCORD_CLIENT_SECRET=
DISCORD_BOT=
REDIRECT_DISCORD_URL=
SPOTIFY_CLIENT_ID=
SPOTIFY_SECRET_ID=
REDIRECT_SPOTIFY_URL=
MOBILE_APP=
```

## Running the Application

Once the `.env` file is configured:

1. Open a terminal in the project directory.
2. Ensure no services are running on ports `8080`, `8081`, and `27017`.
3. Execute the command `docker-compose up --build` to build and start the services.

Your services will now be accessible at the following URLs:

* **Server**: `http://localhost:8080`
* **Client Web**: `http://localhost:8081`
* **Client Mobile**: '<http://localhost:8081/client.apk>" -> provides directly the apk
* **MongoDB**: Internally accessible by the server on port `27017`.

## Shutting Down

To stop the application:

* Use `Ctrl+C` in the terminal if the services were started in the foreground.
* Run `docker-compose down` in a new terminal window if the services were started in detached mode.

This will stop and remove all running containers, networks, and the default anonymous volumes attached to the containers.

## Additional Notes

For detailed information on environment setup and variables, refer to the official documentation of each service (MongoDB, Google Auth, Discord, etc.).

For further support or contribution guidelines, please refer to our contributing document or contact the repository maintainers.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://epitech-area.gitbook.io/area/deployment.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
