Skip to content

Commit

Permalink
coba dynamic env variabel
Browse files Browse the repository at this point in the history
  • Loading branch information
syafiqparadisam committed Nov 1, 2024
1 parent 769c70c commit 9413d1b
Show file tree
Hide file tree
Showing 106 changed files with 776 additions and 126 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/cicd.yml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,11 @@ jobs:
context: "{{defaultContext}}:project"
push: true
tags: ${{secrets.DOCKER_USERNAME}}/portofolio:${{secrets.DOCKER_PORTOFOLIO_TAGS_APP}}

# - name: Run Trivy vulnerability scanner docker container
# uses: aquasecurity/[email protected]
# with:
# scan-type: 'image'
# scan-ref: ${{secrets.DOCKER_USERNAME}}/portofolio:${{secrets.DOCKER_PORTOFOLIO_TAGS_APP}}
# trivy-config: trivy.yaml

build-args:
VITE_SERVICE_ID=${{secrets.VITE_SERVICE_ID}}
VITE_PUBLIC_KEY=${{secrets.VITE_PUBLIC_KEY}}
VITE_TEMPLATE_ID=${{secrets.VITE_TEMPLATE_ID}}

- name: Login into docker hub
uses: docker/login-action@v3
with:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ dist-ssr
*.njsproj
*.sln
*.sw?
.env
.env
.env.production
Empty file modified Makefile
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified infra/.gitkeep
100644 → 100755
Empty file.
Empty file modified infra/docker/dev/compose.yml
100644 → 100755
Empty file.
Empty file modified infra/observability/grafana.yaml
100644 → 100755
Empty file.
Empty file modified infra/observability/prometheus.yaml
100644 → 100755
Empty file.
Empty file modified next-app/.eslintrc.json
100644 → 100755
Empty file.
Empty file modified next-app/.gitignore
100644 → 100755
Empty file.
Empty file modified next-app/README.md
100644 → 100755
Empty file.
Empty file modified next-app/next.config.mjs
100644 → 100755
Empty file.
Empty file modified next-app/package-lock.json
100644 → 100755
Empty file.
Empty file modified next-app/package.json
100644 → 100755
Empty file.
Empty file modified next-app/postcss.config.mjs
100644 → 100755
Empty file.
Empty file modified next-app/src/app/achiviement/page.tsx
100644 → 100755
Empty file.
Empty file modified next-app/src/app/api/metrics.ts
100644 → 100755
Empty file.
Empty file modified next-app/src/app/components/Footer.tsx
100644 → 100755
Empty file.
Empty file modified next-app/src/app/components/NavigationBar.tsx
100644 → 100755
Empty file.
Empty file modified next-app/src/app/contact/page.tsx
100644 → 100755
Empty file.
Empty file modified next-app/src/app/favicon.ico
100644 → 100755
Empty file.
Empty file modified next-app/src/app/fonts/GeistMonoVF.woff
100644 → 100755
Empty file.
Empty file modified next-app/src/app/fonts/GeistVF.woff
100644 → 100755
Empty file.
Empty file modified next-app/src/app/globals.css
100644 → 100755
Empty file.
Empty file modified next-app/src/app/layout.tsx
100644 → 100755
Empty file.
Empty file modified next-app/src/app/page.tsx
100644 → 100755
Empty file.
Empty file modified next-app/src/app/project/page.tsx
100644 → 100755
Empty file.
Empty file modified next-app/src/app/services/page.tsx
100644 → 100755
Empty file.
Empty file modified next-app/src/app/testimoni/page.tsx
100644 → 100755
Empty file.
Empty file modified next-app/src/app/tutorial/page.tsx
100644 → 100755
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified next-app/src/assets/eccomerse2.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified next-app/src/assets/experience-removebg-preview.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified next-app/src/assets/illustrationprogrammer-removebg-preview.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified next-app/src/assets/ilustrasiprogrammer-removebg-preview.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified next-app/src/assets/peoplethinking-removebg-preview.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified next-app/src/assets/ramadhanWebsite.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified next-app/src/assets/school.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified next-app/src/assets/sertiC.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified next-app/src/assets/serti_fitcom.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified next-app/src/assets/serti_solid.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified next-app/src/assets/sertibackend.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified next-app/src/assets/sertidicodingaws.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified next-app/src/assets/sertidicodingdasar.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified next-app/src/assets/sertidicodinggooglecloud.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified next-app/src/assets/sertidicodingjs.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified next-app/src/assets/sertidicodinglogic.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified next-app/src/assets/webreview-removebg-preview.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified next-app/tailwind.config.ts
100644 → 100755
Empty file.
Empty file modified next-app/tsconfig.json
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion project/.dockerignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
node_modules
*.env
*.env.*
Empty file modified project/.env.example
100644 → 100755
Empty file.
Empty file modified project/.eslintrc.cjs
100644 → 100755
Empty file.
11 changes: 10 additions & 1 deletion project/Dockerfile
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ 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}

RUN npm run build

# Use a lightweight web server to serve the app
Expand All @@ -22,7 +32,6 @@ COPY --from=build /app/dist /usr/share/nginx/html

COPY ./nginx.conf /etc/nginx/conf.d/default.conf


COPY ./env.sh /docker-entrypoint.d/env.sh
RUN chmod +x /docker-entrypoint.d/env.sh

Expand Down
Empty file modified project/env.sh
100644 → 100755
Empty file.
Empty file modified project/index.html
100644 → 100755
Empty file.
Empty file modified project/nginx.conf
100644 → 100755
Empty file.
Loading

0 comments on commit 9413d1b

Please sign in to comment.