Skip to content

Commit

Permalink
remove graalvm (for now) cleanup config, add to README.md (#9)
Browse files Browse the repository at this point in the history
* remove graalvm (for now) cleanup config, add to README.md

* incorp review comments & fix .gitignore

and bump spring boot version to match readme

* issue #1: provide shell script to prune docker resources of mongo-db

* newlines at eof
  • Loading branch information
wisskirchenj authored Jan 6, 2024
1 parent 0ccce37 commit bf4622e
Show file tree
Hide file tree
Showing 14 changed files with 51 additions and 86 deletions.
6 changes: 6 additions & 0 deletions .dev/remove-mongo-volume.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
echo "Really delete all flashcards data - including user data ? [y/n]" && read choice
[[ $choice = "y" ]] || exit;

echo "Deleting container and volume ..."
docker ps -a --format '{{.Names}}' | grep '^flashcards' | xargs docker rm -f
docker volume ls -q --filter name=flashcards | xargs docker volume rm
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
root = true

[*]
insert_final_newline = true
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ out/
*.p12

### IntelliJ IDEA ###
.idea/modules.xml
.idea/libraries/
.idea/sonarlint/
!.idea/compiler.xml
.idea/modules/
.idea/*.xml

### Mac OS ###
.DS_Store
Expand Down
15 changes: 0 additions & 15 deletions .idea/compiler.xml

This file was deleted.

17 changes: 0 additions & 17 deletions .idea/gradle.xml

This file was deleted.

20 changes: 0 additions & 20 deletions .idea/jarRepositories.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/jpa-buddy.xml

This file was deleted.

13 changes: 0 additions & 13 deletions .idea/misc.xml

This file was deleted.

10 changes: 10 additions & 0 deletions .idea/runConfigurations/FlashcardsApplication.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,36 @@

Project idea came up in the Hyperskill community team and will be realized by this team.

## Usage

### Run the app
To run the application including startup of MongoDB container, use the stored Run configuration in IntelliJ IDEA.
You can transfer it to the Service tool window for convenience via Add Service -> Run configuration -> Spring.

Alternatively run the following command:

```shell
./gradlew bootRun
```
### Purge docker resources (mongo-data volume and mongo container)
Take care, running this script deletes all persistent data of the mongo container.
```shell
.dev/remove-mongo-volume.sh
```

## Technology / External Libraries

- Java 21
- Spring Boot 3.2.1
- Support for Native image on GraalVM
- Mongo DB via docker-compose
- Vue 3 SPA-Frontend using component framework Vuetify 3
- Packaging with Vite
- Lombok
- Testcontainers
- Gradle 8.5

[//]: # (- Support for Native image on GraalVM)

## Program description

The application represents a digital flashcard app, that allows to create, store and retrieve flashcards via REST-endpoints.
Expand Down
5 changes: 2 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[versions]
spring-boot = "3.2.0"
spring-boot = "3.2.1"
spring-dependency-management = "1.1.4"
graalvm-buildtools = "0.9.28"
node-gradle = "7.0.1"
node-js = "21.5.0"
node-js = "21.5.0"
7 changes: 6 additions & 1 deletion server/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import org.springframework.boot.gradle.tasks.run.BootRun

plugins {
application
id("org.springframework.boot") version libs.versions.spring.boot
id("io.spring.dependency-management") version libs.versions.spring.dependency.management
id("org.graalvm.buildtools.native") version libs.versions.graalvm.buildtools
}

group = "org.hyperskill.community"
Expand Down Expand Up @@ -43,6 +44,10 @@ dependencies {
testImplementation("org.testcontainers:mongodb")
}

tasks.withType<BootRun> {
workingDir = rootProject.projectDir
}

tasks.withType<Test> {
useJUnitPlatform()
}

0 comments on commit bf4622e

Please sign in to comment.