From 46e3cf529c28463d8ac909ac3a0bc118352de6cd Mon Sep 17 00:00:00 2001 From: keven1024 Date: Sat, 21 Jun 2025 15:47:11 +0800 Subject: [PATCH] chore: update Dockerfile and Drone configuration to use VERSION and BUILD_TIME arguments for better build tracking --- .drone.yml | 3 ++- Dockerfile | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 9dc457f..66e955d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -17,7 +17,8 @@ steps: - ${DRONE_TAG} - latest build_args: - - BUILD_TAG=${DRONE_TAG} + - VERSION=${DRONE_TAG} + - BUILD_TIME=${DRONE_BUILD_FINISHED} - name: build-worker image: plugins/docker settings: diff --git a/Dockerfile b/Dockerfile index 1d07bae..f99c410 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,8 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o backend FROM front-base AS runner -ARG BUILD_TAG +ARG VERSION +ARG BUILD_TIME WORKDIR /app RUN apk add --no-cache curl openssl ENV NODE_ENV production @@ -43,6 +44,8 @@ COPY 015.sh /app/015.sh ENV PORT=80 HOST=0.0.0.0 ENV SITE_URL="http://localhost" ENV UPLOAD_PATH="/uploads" +ENV VERSION=${VERSION} +ENV BUILD_TIME=${BUILD_TIME} EXPOSE 80