Restructure Web App into server/ + web/ (GsmNode parity)
Reorganize the Web App to match the GsmNode project layout: a Go backend-for-frontend in server/ that embeds the built SPA and reverse-proxies /api/* to the API Server, with the Vue 3 + Vite frontend moved into web/. - Move all frontend files into web/ (history preserved via renames) - Point vite build output at ../server/dist for Go embedding - Add server/ Go BFF (main.go, go.mod, .env.example, Run-WebApp.ps1) - Drop Docker/nginx deploy (Dockerfile, docker-compose.yml, nginx.conf.template, .dockerignore) in favor of the BFF, matching GsmNode - Update .claude/launch.json to run the dev server from web/ - Rewrite README.md for the new layout Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
ba3f227361
commit
75a2ccc226
@@ -1,33 +0,0 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
# --- Build stage -------------------------------------------------------------
|
||||
# Build the Vue 3 + Vite SPA into static assets.
|
||||
FROM node:22-alpine AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install dependencies against the lockfile for reproducible builds.
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
|
||||
COPY . .
|
||||
|
||||
# VITE_API_BASE is baked into the bundle at build time. Leave empty to use the
|
||||
# same-origin "/api" (nginx proxies it to the API Server — see nginx.conf).
|
||||
ARG VITE_API_BASE
|
||||
RUN npm run build
|
||||
|
||||
# --- Runtime stage -----------------------------------------------------------
|
||||
# Serve the built assets with nginx (Alpine-based) and proxy /api upstream.
|
||||
FROM nginx:alpine
|
||||
|
||||
# nginx substitutes ${API_TARGET} into this template at container start
|
||||
# (only env-defined vars are replaced, so $uri/$host are left intact).
|
||||
COPY nginx.conf.template /etc/nginx/templates/default.conf.template
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
|
||||
# Upstream API Server; override at runtime (compose/`docker run -e`).
|
||||
ENV API_TARGET=http://api-server:8080
|
||||
|
||||
EXPOSE 80
|
||||
# The default nginx entrypoint renders templates then launches nginx.
|
||||
Reference in New Issue
Block a user