mirror of
https://github.com/AJMicke/KickerELO.git
synced 2026-03-11 13:31:02 +01:00
Fix AJMicke requests
This commit is contained in:
48
README.md
48
README.md
@@ -11,48 +11,62 @@ It uses **Spring Boot** for the backend, **Vaadin** for the frontend, and **Mari
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
### 1️⃣ Clone the repository
|
### Clone the repository
|
||||||
```sh
|
```sh
|
||||||
git clone https://github.com/your-repo/kickerelo.git
|
git clone https://github.com/your-repo/kickerelo.git
|
||||||
cd kickerelo
|
cd kickerelo
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2️⃣ Set up the database
|
If you want to run the application in production mode, you can skip to [Production](#production) and set up the database.
|
||||||
|
|
||||||
- **For testing**: No database setup is required, as an H2 in-memory database is used by default.
|
|
||||||
- **For production**: The application requires MariaDB. If MariaDB is already installed, make sure the database and
|
|
||||||
credentials are correctly configured in `application.properties`.
|
|
||||||
|
|
||||||
If you don't have MariaDB installed, you can quickly start a database using Docker:
|
### Testing
|
||||||
|
|
||||||
|
To run the application in a test environment, you can use an embedded H2 database. This is useful for development and testing purposes.
|
||||||
|
|
||||||
|
To build the project and run the application with the embedded H2 database, use the following commands:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
mvn clean package
|
||||||
|
mvn spring-boot:run
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Production
|
||||||
|
|
||||||
|
The application requires a database to store the data. If MariaDB is already installed, make sure the database and
|
||||||
|
credentials are correctly configured in `application-prod.properties` and skip to step [Build the project](#build-the-project).
|
||||||
|
|
||||||
|
#### Set up database
|
||||||
|
|
||||||
|
You can quickly start a database using Docker and update its schema using the provided `update-schema.sql` file.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker run --name kickerelo-db -e MYSQL_ROOT_PASSWORT=root -e MYSQL_DATABASE=kickerelo -p 3306:3306 -d mariadb:latest
|
docker run --name kickerelo-db -e MYSQL_ROOT_PASSWORT=root -e MYSQL_DATABASE=kickerelo -p 3306:3306 -d mariadb:latest
|
||||||
|
docker exec -i kickerelo-db mysql -u root -p kickerelo < update-schema.sql
|
||||||
```
|
```
|
||||||
|
|
||||||
### 3️⃣ Build the project
|
|
||||||
|
#### Build the project
|
||||||
|
|
||||||
To generate the file `target/kickerelo.jar`:
|
To generate the file `target/kickerelo.jar`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
mvn clean package
|
mvn clean package -Pproduction
|
||||||
```
|
```
|
||||||
|
|
||||||
### 4️⃣ Run the application
|
### Run the application
|
||||||
|
|
||||||
- For testing (default):
|
You can run the application in two ways:
|
||||||
|
|
||||||
```sh
|
1. Using Maven:
|
||||||
mvn spring-boot:run
|
|
||||||
```
|
|
||||||
|
|
||||||
- For production (requires MariaDB):
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
mvn spring-boot:run -Dspring-boot.run.profiles=production
|
mvn spring-boot:run -Dspring-boot.run.profiles=production
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively, you can run the built .jar file:
|
2. Using the built .jar file:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
java -jar target/kickerelo.jar
|
java -jar target/kickerelo.jar --spring.profiles.active=prod
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user