This repository is part of the AVefi project.
It includes the Nuxt 3 frontend with full Docker support for local development and production deployment.
In production, all containers run in a shared Docker network. Traefik acts as the reverse proxy.
The frontend is prebuilt into a production Docker container and served as a Node.js app.
- Traefik routes frontend requests (
/) to the containerav-efi-frontend - Backend requests (
/api/v1/,/auth/, etc.) are routed separately - The frontend is served via Nuxt’s
.output/server/index.mjs
-
Build and start the full stack (Traefik + Frontend + Backend):
docker compose up -d --build
-
Open in browser:
http://localhost:8080/
Do not access
localhost:3000in production. The only correct entry point is through Traefik on port 8080.
To work on the frontend code with hot module replacement (HMR), you must run a dummy container named av-efi-frontend to simulate the production network.
This is necessary because Traefik expects a container with that name for service routing.
- Docker Desktop (with WSL2 if on Windows)
- VPN connection to GWDG must be active to retrieve backend and Elasticsearch data
- Nuxt development server runs on your host machine
- The dummy container proxies to
host.docker.internal:3000
docker compose -f docker-compose.dev.yml up -dThis creates a lightweight dummy container called av-efi-frontend:
version: "3.8"
services:
av-efi-frontend:
image: alpine/socat
container_name: av-efi-frontend
command: tcp-listen:3000,fork,reuseaddr tcp-connect:host.docker.internal:3000
networks:
- proxy-network
restart: unless-stopped
networks:
proxy-network:
name: proxy-network
external: trueyarn install
yarn devNuxt will be served locally at:
http://localhost:3000/
But you must access it through Traefik:
http://localhost:8080/
If you open
localhost:3000directly, you bypass Traefik and backend/API routes will fail.
If you don't need to edit the code or use HMR:
docker compose up --buildThen open:
http://localhost:8080/
rm -rf node_modules .yarn/cache .yarn/install-state.gz
yarn cache clean
yarn installtaskkill /F /IM node.exeDummy container for Nuxt local development, required to keep Traefik routing intact.
Includes vite.hmr.port = 24678 and watch.usePolling for file reload in WSL2/Docker.
Example snippet for routing:
http:
routers:
local-home:
entryPoints: [local]
rule: "Host(`localhost`)"
service: home
services:
home:
loadBalancer:
servers:
- url: "http://av-efi-frontend:3000"| Environment | Access URL | Use Case |
|---|---|---|
| 🐳 Production | http://localhost:8080/ |
Full setup with reverse proxy |
| 🛠 Local Dev (Nuxt) | http://localhost:8080/ |
Via dummy container + Nuxt HMR |
| ⛔ Wrong Access | http://localhost:3000/ |
❌ Bypasses Traefik — no API |
© AVefi Project 2025