Skip to content

Commit

Permalink
patch koyeb dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
storytellerF committed Dec 24, 2024
1 parent 30e0433 commit 4e08521
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Dockerfile.patched
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM eclipse-temurin:21 AS builder
FROM eclipse-temurin:21-alpine AS builder

RUN apt-get update && apt-get install -y \
unzip
RUN apk add bash

#^1
#patched
Expand Down Expand Up @@ -57,6 +56,8 @@ ARG MINIO_NAME
ENV MINIO_NAME=$MINIO_NAME
ARG MINIO_PASS
ENV MINIO_PASS=$MINIO_PASS
ARG FILE_SYSTEM_MEDIA_PATH
ENV FILE_SYSTEM_MEDIA_PATH=$FILE_SYSTEM_MEDIA_PATH
ARG DATABASE_URI
ENV DATABASE_URI=$DATABASE_URI
ARG DATABASE_PORT
Expand Down Expand Up @@ -129,6 +130,7 @@ MINIO_PORT=${MINIO_PORT}
MINIO_PORT_CONSOLE=${MINIO_PORT_CONSOLE}
MINIO_NAME=${MINIO_NAME}
MINIO_PASS=${MINIO_PASS}
FILE_SYSTEM_MEDIA_PATH=${FILE_SYSTEM_MEDIA_PATH}
DATABASE_URI=${DATABASE_URI}
DATABASE_PORT=${DATABASE_PORT}
DATABASE_DB=${DATABASE_DB}
Expand Down Expand Up @@ -162,15 +164,16 @@ ENV HOST_TYPE=docker
RUN --mount=type=cache,target=/root/.gradle \
./scripts/build_scripts/build-all-in-flavor.sh ${FLAVOR} ${IS_PROD}

FROM eclipse-temurin:21
RUN mkdir -p ./cli/build/decompressed && tar -xf ./cli/build/distributions/cli.tar -C ./cli/build/decompressed

FROM eclipse-temurin:21-alpine

RUN mkdir /app

WORKDIR /app
COPY --from=builder /app/server/build/libs/*-all.jar ./ktor-server.jar
COPY --from=builder /app/cli/build/distributions/cli.tar ./cli.tar
COPY --from=builder /app/cli/build/decompressed/cli .
COPY --from=builder /app/deploy ./deploy
COPY scripts/tool_scripts/flush-database-singleton.sh ./scripts/tool_scripts/flush-database-singleton.sh
RUN tar -xf ./cli.tar

ENTRYPOINT ["java","-jar","./ktor-server.jar"]
3 changes: 3 additions & 0 deletions deploy/Dockerfile.koyeb.patched
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ ARG MINIO_PORT
ARG MINIO_PORT_CONSOLE
ARG MINIO_NAME
ARG MINIO_PASS
ARG FILE_SYSTEM_MEDIA_PATH
ARG DATABASE_URI
ARG DATABASE_PORT
ARG DATABASE_DB
Expand Down Expand Up @@ -84,6 +85,7 @@ MINIO_PORT=${MINIO_PORT}
MINIO_PORT_CONSOLE=${MINIO_PORT_CONSOLE}
MINIO_NAME=${MINIO_NAME}
MINIO_PASS=${MINIO_PASS}
FILE_SYSTEM_MEDIA_PATH=${FILE_SYSTEM_MEDIA_PATH}
DATABASE_URI=${DATABASE_URI}
DATABASE_PORT=${DATABASE_PORT}
DATABASE_DB=${DATABASE_DB}
Expand Down Expand Up @@ -147,6 +149,7 @@ ARG MINIO_PORT
ARG MINIO_PORT_CONSOLE
ARG MINIO_NAME
ARG MINIO_PASS
ARG FILE_SYSTEM_MEDIA_PATH
ARG DATABASE_URI
ARG DATABASE_PORT
ARG DATABASE_DB
Expand Down

0 comments on commit 4e08521

Please sign in to comment.