DONE: pipeline cicd for backend

This commit is contained in:
ISMAIL MASSERAN
2026-07-23 11:31:17 +08:00
parent 85b31e9528
commit 523218faa5
10 changed files with 343 additions and 21 deletions
+35 -6
View File
@@ -1,9 +1,38 @@
## Build instructions
## Build instructions (local)
- Enter your database details in the **src/main/resources/application.yml** file
- Through IntelliJ simply click on the run button
- Or through console
- ./mvnw dependency:resolve
- ./mvnw spring-boot:run
- 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
```