Skip to content

feat: update environment configuration for Docker and frontend compon… - #2

Merged
dev-bramwel merged 2 commits into
masterfrom
feat/docker
Aug 31, 2026
Merged

dev-bramwel merged 2 commits into
masterfrom
feat/docker

Conversation

@dev-bramwel

Copy link
Copy Markdown
Owner

…ents

@vercel

vercel Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
loopi-pay Ready Ready Preview Aug 31, 2026 4:35pm

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0603c4646d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

import { useNavigate, Link } from "react-router-dom";

const API_URL = import.meta.env.VITE_API_URL || "http://127.0.0.1:8000";
const API_URL = import.meta.env.VITE_API_URL || window.location.origin;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore the standalone Vite API fallback

When following the documented npm run dev flow without setting VITE_API_URL, this now resolves API calls to the Vite origin (http://localhost:5173). frontend/vite.config.js has no /api proxy, while Django runs on port 8000, so login and the other clients changed to this fallback receive the frontend server's SPA response instead of reaching the API.

Useful? React with 👍 / 👎.

dockerfile: deployments/Dockerfile.frontend
args:
VITE_API_URL: ${VITE_API_URL:-http://localhost:8000}
VITE_API_URL: ${VITE_API_URL:-http://localhost}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Route the Docker frontend API base through its published port

In the default development Compose stack, the frontend is published only on host port 5173, and its nginx /api/ proxy is therefore reached at http://localhost:5173. Baking http://localhost into the bundle instead makes every browser API request go to port 80, where this stack publishes nothing; the default dashboard, registration, and payment flows cannot reach the backend unless users add a manual override.

Useful? React with 👍 / 👎.

PAYSTACK_SECRET_KEY: ${PAYSTACK_SECRET_KEY:-}
PAYSTACK_PUBLIC_KEY: ${PAYSTACK_PUBLIC_KEY:-}
FRONTEND_URL: ${FRONTEND_URL:-http://localhost:5173}
FRONTEND_URL: ${FRONTEND_URL:-http://localhost}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep generated frontend links on the development frontend port

With the default development Compose mapping, the frontend is available at http://localhost:5173, not port 80. The backend uses FRONTEND_URL to generate QR /pay links and verification-email links, so this default sends scanned-payment and emailed-verification users to http://localhost/..., where no frontend service is exposed.

Useful? React with 👍 / 👎.

amount,
vendor,
output_dir="qr_codes",
backend_url="http://localhost",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Retain the backend port for the QR generator default

Running this script with its documented arguments after starting Django via python manage.py runserver now posts to port 80 instead of Django's default port 8000. The CLI exposes no backend URL argument, so its normal pre-registration step always fails unless an unrelated service happens to proxy the API on port 80.

Useful? React with 👍 / 👎.

@dev-bramwel
dev-bramwel merged commit ff6cc37 into master Aug 31, 2026
2 of 5 checks passed

This branch was successfully deployed

1 active deployment
Preview — 0603c464 Deployed Aug 31, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant