Skip to content

Commit

Permalink
Merge pull request #993 from puzzle/fix/pipeline
Browse files Browse the repository at this point in the history
Fix/pipeline
  • Loading branch information
kcinay055679 authored Sep 10, 2024
2 parents 53b7fbc + bb2c03d commit 5691c7e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
4 changes: 1 addition & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ USER 1001

WORKDIR app-root/backend

RUN if [ -d "../backend/target" ]; then \
cp -r --chown=1001 ../backend/target .; \
fi
COPY --chown=1001 backend/target .

ENTRYPOINT ["/bin/sh", "-c", "export BACKEND_VERSION=$(find . -type f -name 'backend-*.jar' -print -quit | sed -n 's/.*backend-\\(.*\\)\\.jar/\\1/p'); java -jar backend-${BACKEND_VERSION}.jar"]
4 changes: 2 additions & 2 deletions docker/local-prod/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ services:
spring:
container_name: spring
build:
context: ./..
dockerfile: Dockerfile
context: .
dockerfile: local-prod.Dockerfile
restart: always
ports:
- 8080:8080
Expand Down
12 changes: 12 additions & 0 deletions docker/local-prod/local-prod.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM alpine:3.19

USER root

RUN apk update && apk add --upgrade curl && apk --no-cache add openjdk17

RUN adduser --home /app-root --uid 1001 --disabled-password okr
USER 1001

WORKDIR app-root/backend

ENTRYPOINT ["/bin/sh", "-c", "export BACKEND_VERSION=$(find . -type f -name 'backend-*.jar' -print -quit | sed -n 's/.*backend-\\(.*\\)\\.jar/\\1/p'); java -jar backend-${BACKEND_VERSION}.jar"]

0 comments on commit 5691c7e

Please sign in to comment.