React + Vite + Docker + Github Action
GitHub Actions / Local Build
docker build --build-arg API_ENDPOINT=https://api.staging.com
Dockerfile Build Stage
ARG API_ENDPOINT=http://localhost:8080 ← Build-time variable with default
ENV VITE_API_ENDPOINT=${API_ENDPOINT} ← Sets environment...
bikash8848.hashnode.dev1 min read