diff --git a/.github/workflows/frontend-dev.yaml b/.github/workflows/frontend-dev.yaml index 2b39740..4854337 100644 --- a/.github/workflows/frontend-dev.yaml +++ b/.github/workflows/frontend-dev.yaml @@ -26,7 +26,7 @@ jobs: uses: actions/checkout@v4 - name: Build Docker image - run: docker build -f frontend/Dockerfile -t ${{ env.DOCKER_TAGS }} . + run: docker build --build-arg VITE_DEPLOYMENT_ENV=dev -f frontend/Dockerfile -t ${{ env.DOCKER_TAGS }} . deploy: name: Deploy Frontend to DEV @@ -54,6 +54,8 @@ jobs: push: true tags: ${{ env.DOCKER_TAGS }} platforms: linux/arm64 + build-args: | + VITE_DEPLOYMENT_ENV=dev - name: Install cloudflared run: | diff --git a/.github/workflows/frontend-prd.yaml b/.github/workflows/frontend-prd.yaml index 53b4753..8327de0 100644 --- a/.github/workflows/frontend-prd.yaml +++ b/.github/workflows/frontend-prd.yaml @@ -26,7 +26,7 @@ jobs: uses: actions/checkout@v4 - name: Build Docker image - run: docker build -f frontend/Dockerfile -t ${{ env.DOCKER_TAGS }} . + run: docker build --build-arg VITE_DEPLOYMENT_ENV=prd -f frontend/Dockerfile -t ${{ env.DOCKER_TAGS }} . deploy: name: Deploy Frontend to PRD @@ -54,6 +54,8 @@ jobs: push: true tags: ${{ env.DOCKER_TAGS }} platforms: linux/arm64 + build-args: | + VITE_DEPLOYMENT_ENV=prd - name: Install cloudflared run: | diff --git a/frontend/Dockerfile b/frontend/Dockerfile index fb119a4..1ebabdb 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -6,6 +6,8 @@ COPY frontend/ . COPY shared/ /app/shared/ ARG VITE_API_BASE_URL=/api ENV VITE_API_BASE_URL=$VITE_API_BASE_URL +ARG VITE_DEPLOYMENT_ENV +ENV VITE_DEPLOYMENT_ENV=$VITE_DEPLOYMENT_ENV RUN npm run build FROM nginx:alpine diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index cb56bb1..4756a17 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -6,13 +6,14 @@ import { ChallengesTable } from './components/ChallengesTable'; import { BridgesTable } from './components/BridgesTable'; import { MintersTable } from './components/MintersTable'; import { HealthStatus } from './components/HealthStatus'; +import { Footer } from './components/Footer'; function App() { const { health, jusd, positions, collateral, challenges, minters } = useApi(); return ( -