fix: 💚 Move git commit env var in last step of Dockerfile to avoid it being removed

This commit is contained in:
Jesse Wierzbinski 2024-07-26 00:17:54 +02:00
parent 39d9b4c031
commit 152e42fd30
No known key found for this signature in database

View file

@ -20,10 +20,6 @@ COPY . /temp
# Copy dependencies
COPY --from=install /temp/node_modules /temp/node_modules
# Set current Git commit hash as an environment variable
ARG GIT_COMMIT
ENV GIT_COMMIT=$GIT_COMMIT
# Build the project
WORKDIR /temp
RUN bun run build
@ -46,6 +42,10 @@ LABEL org.opencontainers.image.licenses="AGPL-3.0-or-later"
LABEL org.opencontainers.image.title="Lysand Server"
LABEL org.opencontainers.image.description="Lysand Server docker image"
# Set current Git commit hash as an environment variable
ARG GIT_COMMIT
ENV GIT_COMMIT=$GIT_COMMIT
# CD to app
WORKDIR /app
ENV NODE_ENV=production