Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker stuff for dev #48

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"