File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -12,3 +12,13 @@ quarkus.flyway.locations = classpath:org/lfenergy/compas/scl/data/reposit
1212mp.jwt.verify.issuer = ${JWT_VERIFY_ISSUER:http://127.0.0.1:8089/auth/realms/compas}
1313
1414compas.scl-data-service.features.soft-delete-enabled = true
15+
16+ # Run with local PostgreSQL database provided by "app/src/test/resources/docker-compose.yml"
17+ # For more details have a look at the [development documentation](doc/development.md).
18+
19+ # quarkus.datasource.devservices.enabled = false
20+ # quarkus.datasource.db-kind = postgresql
21+ # quarkus.datasource.jdbc.url = jdbc:postgresql://${POSTGRESQL_HOST:localhost}:${POSTGRESQL_PORT:5432}/${POSTGRESQL_DB:compas}
22+ # quarkus.datasource.jdbc.max-size = 16
23+ # quarkus.datasource.username = ${POSTGRESQL_USERNAME:postgres}
24+ # quarkus.datasource.password = ${POSTGRESQL_PASSWORD:postgres}
Original file line number Diff line number Diff line change @@ -33,3 +33,28 @@ The `<ACCESS_TOKEN>` should be replaced with a valid JWT token obtained from Key
3333 -H " Content-Type: application/x-www-form-urlencoded" \
3434 -d " client_id=scl-data-service&username=scl-data-editor&password=editor&grant_type=password"
3535```
36+
37+ ## Connecting to local database
38+
39+ To connect to the local PostgreSQL database, you first need to start the PostgreSQL service using Docker Compose:
40+ ```
41+ cd app/src/test/resources/docker-compose.yml
42+ docker-compose up postgresql
43+ ```
44+
45+ then enable the postgresql configuration by uncomment following lines in file ` src/main/resources/application-local.properties ` :
46+ ``` properties
47+ quarkus.datasource.devservices.enabled = false
48+ quarkus.datasource.db-kind = postgresql
49+ quarkus.datasource.jdbc.url = jdbc:postgresql://${POSTGRESQL_HOST:localhost}:${POSTGRESQL_PORT:5432}/${POSTGRESQL_DB:compas}
50+ quarkus.datasource.jdbc.max-size = 16
51+ quarkus.datasource.username = ${POSTGRESQL_USERNAME:postgres}
52+ quarkus.datasource.password = ${POSTGRESQL_PASSWORD:postgres}
53+ ```
54+
55+ Start the application in development mode with the local profile:
56+ ``` bash
57+ mvn -DskipTests=true -Dquarkus.profile=local package io.quarkus:quarkus-maven-plugin::dev
58+ ```
59+
60+ You can then verify the setup described above by using the same curl commands as mentioned earlier.
You can’t perform that action at this time.
0 commit comments