## Build instructions (local)

- Enter your database details in the **src/main/resources/application.yml** file (or use env vars)
- Through IntelliJ simply click on the run button
- Or through console
    - `./mvnw dependency:resolve`
    - `./mvnw spring-boot:run`

##### **NOTE:** requires Java 17 and MySQL 8

## Docker deployment (single server)

From the `be/` directory:

```bash
cp .env.example .env
# Edit .env if ports 8080 / 3306 are already in use on the server

docker compose up -d --build
```

Services and default host ports:

| Service  | Container | Host port (configurable) |
|----------|-----------|---------------------------|
| Backend  | qms-backend | `BACKEND_HOST_PORT` → **8080** |
| MySQL    | qms-mysql   | `MYSQL_HOST_PORT` → **3306** |

API base URL on the server: `http://<server-ip>:8080`

Useful commands:

```bash
docker compose ps
docker compose logs -f backend
docker compose down          # stop containers (keeps DB volume)
docker compose down -v       # stop and delete DB/uploads volumes
```
