Skip to content

Commit

Permalink
Added final presentation file and Dockerfiles for ttests
Browse files Browse the repository at this point in the history
  • Loading branch information
andre-j3sus committed Apr 12, 2024
1 parent eeb87a9 commit f0f7654
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,25 @@ services:
- "80:80"
volumes:
- ./dockerfiles/nginx:/etc/nginx

battleships-db-test:
container_name: battleships-db-test
build:
context: .
dockerfile: dockerfiles/Dockerfile-db
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=daw_g03_test
ports:
- "5432:5432"

battleships-test:
container_name: battleships-test
depends_on:
- battleships-db-test
build:
context: .
dockerfile: dockerfiles/Dockerfile-test
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://battleships-db-test/daw_g03_test
26 changes: 26 additions & 0 deletions dockerfiles/Dockerfile-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
ARG DEPENDENCY=./code/jvm
ARG APP_HOME=/usr/app

FROM gradle:jdk17 AS CACHE_IMAGE
ARG DEPENDENCY
ARG APP_HOME
ENV GRADLE_USER_HOME=$APP_HOME/.gradle

RUN mkdir -p $APP_HOME
COPY $DEPENDENCY/build.gradle.kts $APP_HOME
WORKDIR $APP_HOME
RUN gradle --no-daemon

FROM gradle:jdk17 AS BUILDER_IMAGE
ARG DEPENDENCY
ARG APP_HOME
ENV GRADLE_USER_HOME=$APP_HOME/.gradle
COPY --from=CACHE_IMAGE $APP_HOME/.gradle $APP_HOME/.gradle

COPY $DEPENDENCY/settings.gradle.kts $APP_HOME
COPY $DEPENDENCY/build.gradle.kts $APP_HOME
COPY $DEPENDENCY/src $APP_HOME/src

WORKDIR $APP_HOME

RUN gradle test --no-daemon
Binary file added docs/BattleshipsWeb - Final Presentation.pptx
Binary file not shown.

0 comments on commit f0f7654

Please sign in to comment.