diff --git a/Dockerfile b/Dockerfile index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..14829399090cbddde87ab54bdc8256de2016b0d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM eclipse-temurin:17-jdk +WORKDIR /app +COPY . /app +EXPOSE 8080 +ENTRYPOINT ["./gradlew","bootRun"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 50b999b7b5d6792b22417a40169d279bba8dcff1..75c3050e5adca37da0976d6ca379e339a7a133eb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,6 +25,8 @@ services: - PGADMIN_LISTEN_PORT=8080 ports: - "9001:8080" + volumes: + - pgadmin-data:/var/lib/pgadmin springboot: build: @@ -35,4 +37,5 @@ services: - postgres volumes: - postgres-data: \ No newline at end of file + postgres-data: + pgadmin-data: \ No newline at end of file diff --git a/src/main/kotlin/de/thk/gm/gdw/todolist/controllers/TasksController.kt b/src/main/kotlin/de/thk/gm/gdw/todolist/controllers/TasksController.kt index d9a34cbe3505f111c91864d5dc0d179a6922a3cd..ea5470eca550272760c254b27024dde8f0478d5e 100644 --- a/src/main/kotlin/de/thk/gm/gdw/todolist/controllers/TasksController.kt +++ b/src/main/kotlin/de/thk/gm/gdw/todolist/controllers/TasksController.kt @@ -2,14 +2,10 @@ package de.thk.gm.gdw.todolist.controllers import de.thk.gm.gdw.todolist.services.TasksService import de.thk.gm.gdw.todolist.services.UsersService -import jakarta.validation.Valid -import org.springframework.http.HttpStatus import org.springframework.http.MediaType import org.springframework.stereotype.Controller import org.springframework.ui.Model -import org.springframework.validation.BindingResult import org.springframework.web.bind.annotation.* -import org.springframework.web.servlet.mvc.support.RedirectAttributes import java.util.* @Controller diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties index 0e1ef03c24a2948dcd59b611d7a2a65f216b1a07..ab44f31edbb156952d4fc8b2df999bed381e845d 100644 --- a/src/main/resources/application-prod.properties +++ b/src/main/resources/application-prod.properties @@ -1,3 +1,4 @@ +#application-prod.properties spring.datasource.url= jdbc:postgresql://postgres:5432/todo spring.datasource.username=user spring.datasource.password=password diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 1820d9f06ac9803435d33945b9bcf3ee74ff7999..f6490a5aa41e014a29e2e8a777c2441d3b0a9c74 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,11 +1,7 @@ +#application.properties spring.application.name=todolist #spring.datasource.url=jdbc:h2:file:./todolistdb spring.datasource.url=jdbc:h2:mem:todolist -#spring.datasource.url=jdbc:mys -#spring.datasource.url=jdbc:mysql://localhost:3306/mydatabase -#spring.datasource.username=myuser -#spring.datasource.password=secret -#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.username=sa spring.datasource.password=password spring.jpa.hibernate.ddl-auto=update