Skip to content

Commit

Permalink
Use spring docker compose properties (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
hdescottes authored Jan 13, 2024
1 parent 7d8e813 commit 44b0ad6
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Docker compose setup
uses: adambirds/[email protected]
with:
compose-file: "./app-api/docker/docker-compose-e2e.yml"
down-flags: "--remove-orphans"

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
Expand All @@ -81,3 +75,7 @@ jobs:
working-directory: app-ui
build: npm run build
start: npm start

- name: Stop Backend server
run: curl -X POST http://localhost:8080/actuator/shutdown
if: always()
2 changes: 2 additions & 0 deletions app-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ repositories {
dependencies {
implementation("org.springframework.boot:spring-boot-starter-web:$springBootVersion")
implementation("org.springframework.boot:spring-boot-starter-data-jpa:$springBootVersion")
implementation("org.springframework.boot:spring-boot-starter-actuator:$springBootVersion")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${jsr310Version}")
implementation("org.liquibase:liquibase-core:${liquibaseVersion}")
developmentOnly("org.springframework.boot:spring-boot-docker-compose:$springBootVersion")
runtimeOnly("org.postgresql:postgresql:${postgresVersion}")
testImplementation("org.springframework.boot:spring-boot-starter-test:$springBootVersion")
testImplementation("org.apache.commons:commons-lang3:$apacheLang3Version")
Expand Down
14 changes: 14 additions & 0 deletions app-api/src/main/resources/application-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@ spring:
database-platform: org.hibernate.dialect.PostgreSQLDialect
hibernate:
ddl-auto: update
docker:
compose:
file: docker/docker-compose-e2e.yml
stop:
command: down
liquibase:
change-log: classpath:/db/changelog/db.changelog-master-e2e.yaml

management:
endpoints:
web:
exposure:
include: "*"
endpoint:
shutdown:
enabled: true

14 changes: 14 additions & 0 deletions app-api/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,17 @@ spring:
database-platform: org.hibernate.dialect.PostgreSQLDialect
hibernate:
ddl-auto: update
docker:
compose:
file: docker/docker-compose.yml
stop:
command: down

management:
endpoints:
web:
exposure:
include: "*"
endpoint:
shutdown:
enabled: true

0 comments on commit 44b0ad6

Please sign in to comment.