Skip to content

Commit

Permalink
Merge pull request #48 from aodn/dev-docker
Browse files Browse the repository at this point in the history
docker stuff for dev
  • Loading branch information
digorgonzola authored Feb 22, 2024
2 parents b40d4a9 + abbfda9 commit bf6b4b8
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Stage 1: Build the Spring Boot application
FROM maven:latest AS builder
WORKDIR /app
COPY pom.xml .
RUN mvn dependency:go-offline

COPY src ./src

RUN mvn clean install -DskipTests

#########################3

# Stage 2: Run the Spring Boot application
FROM amazoncorretto:17

WORKDIR /app

COPY --from=builder /app/target/es-indexer-0.0.1-SNAPSHOT.jar /app/app.jar

EXPOSE 8080

CMD ["java", "-jar", "app.jar"]
12 changes: 12 additions & 0 deletions docker-compose-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: "3.5"

services:
indexer:
build:
context: .
dockerfile: ./Dockerfile.dev
container_name: aodn_es_indexer_dev
env_file:
- .env
ports:
- "8080:8080"

0 comments on commit bf6b4b8

Please sign in to comment.