-
Notifications
You must be signed in to change notification settings - Fork 75
Docker/Podman Compose setup to fix frontend/backend connectivity for new contributors #896
Description
Problem
Several applicants are struggling to get the frontend to fetch badges from the backend. The root cause is the VM network boundary introduced by the badges Vagrant VM. This creates multiple compounding issues:
- Dynamic IP — the VM is assigned a different IP (e.g.
192.168.122.x) each session, breaking any hardcoded address in the frontend config - CORS — the browser blocks requests from
http://localhost:5173to a different origin (the VM IP) unless Flask explicitly sends the correct CORS headers - Self-signed certificate — the backend runs on HTTPS inside the VM with a self-signed cert (step 22 of the setup gist). Browsers silently refuse cross-origin requests to untrusted HTTPS endpoints
- Firewall — the host firewall blocks connections to the VM's private
virbr0network, requiringfirewalldto be disabled (step 25), which many applicants miss
Together these make the frontend/backend connection unreliable and hard to debug for new contributors.
Proposed Solution
Add an optional Docker Compose setup that replaces the badges VM and database steps. Everything runs on localhost inside containers, which eliminates all of the above issues in one go. A Vite proxy config forwards frontend requests to the backend at localhost:5000 with no CORS configuration needed.
Contributors would run docker compose up --build instead of the Vagrant steps for the badges VM.
The existing Vagrantfile and ipa/auth VMs are untouched — this would be purely opt-in.