Skip to content

Commit

Permalink
haruse bener iki
Browse files Browse the repository at this point in the history
  • Loading branch information
syafiqparadisam committed Nov 4, 2024
1 parent f221dbb commit d3864b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,4 @@ jobs:
with:
context: "{{defaultContext}}:project"
push: true
tags: ${{secrets.DOCKER_USERNAME}}/portofolio:${{secrets.DOCKER_PORTOFOLIO_TAGS_APP}}
build-args:
VITE_SERVICE_ID=${{secrets.VITE_SERVICE_ID}}
VITE_PUBLIC_KEY=${{secrets.VITE_PUBLIC_KEY}}
VITE_TEMPLATE_ID=${{secrets.VITE_TEMPLATE_ID}}
tags: ${{secrets.DOCKER_USERNAME}}/portofolio:${{secrets.DOCKER_PORTOFOLIO_TAGS_APP}}
13 changes: 4 additions & 9 deletions project/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use base image from nodejs alpine
FROM node:20.12-alpine AS build
FROM node:21-alpine AS build

# Set workdir in docker container
WORKDIR /app
Expand All @@ -12,15 +12,10 @@ RUN npm install
# Copy source code
COPY . .

# Definisikan argumen build
ARG VITE_SERVICE_ID
ARG VITE_TEMPLATE_ID
ARG VITE_PUBLIC_KEY

# Set environment variable dari argumen
ENV VITE_SERVICE_ID=$VITE_SERVICE_ID
ENV VITE_PUBLIC_KEY=$VITE_PUBLIC_KEY
ENV VITE_TEMPLATE_ID=$VITE_TEMPLATE_ID
ENV VITE_SERVICE_ID="MY_APP_SERVICE_ID"
ENV VITE_PUBLIC_KEY="MY_APP_PUBLIC_KEY"
ENV VITE_TEMPLATE_ID="MY_APP_TEMPLATE_ID"

RUN npm run build

Expand Down

0 comments on commit d3864b9

Please sign in to comment.