feat(frontend): make API endpoint configurable via environment variable
Use nginx template support to allow API_URL to be passed at container runtime, enabling the same image to be deployed to different environments. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+5
-2
@@ -21,8 +21,11 @@ FROM nginx:alpine
|
||||
# Copy built files
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
|
||||
# Copy nginx config
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
# Copy nginx template (processed at startup with envsubst)
|
||||
COPY nginx.conf.template /etc/nginx/templates/default.conf.template
|
||||
|
||||
# Default API URL (override with -e API_URL=...)
|
||||
ENV API_URL=http://api:8000/
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
|
||||
Reference in New Issue
Block a user