-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from aodn/dev-docker
docker stuff for dev
- Loading branch information
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |