ci: fix production env
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

pull/78/head 1.0.0-production.1
Supan Adit Pratama 2024-08-23 10:06:24 +07:00
parent c3950c7041
commit 4a13730231
2 changed files with 20 additions and 7 deletions

View File

@ -14,6 +14,22 @@ steps:
script:
- cd /home/eigen/PROJECT/POS/POS.DEV/BE
- sh build.sh
when:
ref:
- refs/tags/devel_*
- refs/tags/*-alpha.*
- name: build-production
image: plugins/docker
settings:
registry: registry.eigen.co.id
repo: registry.eigen.co.id/eigen/${DRONE_REPO_NAME}
build_args:
- env_target=env.production
tags: ${DRONE_TAG}
custom_dns: 172.10.10.16
when:
ref:
- refs/tags/*-production.*
- name: send-message
image: plugins/webhook
settings:
@ -27,9 +43,6 @@ steps:
"message": "Build {{repo.name}} sudah selesai"
}
trigger:
ref:
- refs/tags/devel_*
- refs/tags/*-alpha.*
event:
exclude:
- promote

View File

@ -5,11 +5,11 @@ COPY . .
RUN yarn install
RUN yarn build
FROM node:18.17-alpine
ARG env_target
# ARG env_target
WORKDIR /app
RUN echo ${env_target}
COPY env/$env_target /app/.env
COPY --from=builder /app/env/$env_target .env
# RUN echo ${env_target}
# COPY env/$env_target /app/.env
# COPY --from=builder /app/env/$env_target .env
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/assets ./assets