diff --git a/backend/Dockerfile b/backend/Dockerfile index 6af43f6..56f8316 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -6,5 +6,5 @@ RUN ["gradle", "bootJar"] FROM openjdk:11-jre-slim WORKDIR /root COPY --from=build /root/build/libs/*.jar app.jar -EXPOSE 80 +EXPOSE 5000 ENTRYPOINT ["java", "-jar", "app.jar"] diff --git a/backend/src/main/java/de/hft/geotime/record/TimeRecord.java b/backend/src/main/java/de/hft/geotime/record/TimeRecord.java index 3280d37..6e7293a 100644 --- a/backend/src/main/java/de/hft/geotime/record/TimeRecord.java +++ b/backend/src/main/java/de/hft/geotime/record/TimeRecord.java @@ -20,7 +20,7 @@ public class TimeRecord { @Id private long id; @OneToOne - private TimetrackAccount account; + private TimetrackAccount account; // TimetrackAccount ID (Lazy) private Date startdate; private Date enddate; private Duration time; diff --git a/backend/src/main/java/de/hft/geotime/timetrackaccount/TimetrackAccount.java b/backend/src/main/java/de/hft/geotime/timetrackaccount/TimetrackAccount.java index 772e6ec..4d0c8e1 100644 --- a/backend/src/main/java/de/hft/geotime/timetrackaccount/TimetrackAccount.java +++ b/backend/src/main/java/de/hft/geotime/timetrackaccount/TimetrackAccount.java @@ -17,7 +17,7 @@ public class TimetrackAccount { @GeneratedValue(strategy = GenerationType.AUTO) private long id; @OneToOne - private TimetrackUser timetrackUser; + private TimetrackUser timetrackUser; // TimetrackUser Id (Lazy) [REMOVE] private double revenue; private String name; private String description; diff --git a/backend/src/main/java/de/hft/geotime/user/TimetrackUser.java b/backend/src/main/java/de/hft/geotime/user/TimetrackUser.java index aebd202..47f85df 100644 --- a/backend/src/main/java/de/hft/geotime/user/TimetrackUser.java +++ b/backend/src/main/java/de/hft/geotime/user/TimetrackUser.java @@ -21,12 +21,12 @@ public class TimetrackUser { private long id; @UniqueElements private String username; - private String password; + private String password; // strip private String firstname; private String lastname; @OneToOne - private Role role; + private Role role; // Projection (String) @OneToMany - private List timetrackAccounts; + private List timetrackAccounts; // Lazy List } diff --git a/backend/src/main/resources/application.properties b/backend/src/main/resources/application.properties index fb71f70..5a68d62 100644 --- a/backend/src/main/resources/application.properties +++ b/backend/src/main/resources/application.properties @@ -1,4 +1,4 @@ -server.port=80 +server.port=5000 spring.datasource.hikari.initialization-fail-timeout=0 spring.datasource.hikari.max-lifetime=300000 spring.jpa.show-sql=true diff --git a/docker-compose.yml b/docker-compose.yml index a4392b7..ccd86b9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,7 +15,7 @@ services: build: context: ./backend ports: - - "5000:80" + - "5000:5000" depends_on: - db