DAW Project 2024/2025 - LEIC51D - Group 06
- Bernardo Jaco - 51690
- João Silva - 51682
- Pedro Monteiro - 51457
This project uses Docker Compose to orchestrate the Database (PostgreSQL), Backend (JVM/Spring Boot), and Frontend (React/Nginx).
- Docker Engine & Docker Compose
- Java 21 (to run Gradle wrappers)
-
Navigate to the Gradle project root:
cd code/jvm/PokerDice -
Build Docker Images: This command compiles the Backend (Kotlin) and Frontend (TypeScript/Vite), and builds the local Docker images.
./gradlew buildImageAll
-
Start the Environment: This command launches all containers (Postgres, API, Nginx).
./gradlew allUp
-
Access the Application: Open your browser at: http://localhost:5173
Note: Nginx acts as a reverse proxy. The React app is served at
/, and API requests are proxied to/api.
If you wish to run the Frontend locally (npm run dev) while keeping the Backend in Docker:
-
Build Backend & DB Images:
cd code/jvm/PokerDice ./gradlew buildImagePostgres ./gradlew buildImageJvm -
Start Backend Services: Start only the database and backend services (ignoring Nginx).
docker compose up pokerdice-postgres pokerdice-jvm
-
Run the Frontend: Open a new terminal:
cd code/ts npm install npm run dev
To stop the containers:
cd code/jvm/PokerDice
./gradlew allDown