Initial commit: Visigine (Vite client + Express/SQLite backend)
Container-ready via docker/ compose (frontend nginx + backend Node). Compose adjusted for Coolify on the prod server: frontend uses expose:80 (no host binding — host 8080 is taken by the Coolify proxy; Traefik routes visigine.de), backend ALLOWED_ORIGINS=https://visigine.de. Secrets stay in server/.env (git-ignored); see server/.env.example. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
23
docker/frontend.Dockerfile
Normal file
23
docker/frontend.Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
# Visigine frontend — multi-stage: build React with Vite, then serve with nginx.
|
||||
# Build context is the repo root (see docker-compose.yml).
|
||||
|
||||
# ── stage 1: build ────────────────────────────────────────────────
|
||||
FROM node:20-alpine AS build
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json package-lock.json* ./
|
||||
RUN npm ci
|
||||
|
||||
COPY index.html vite.config.js eslint.config.js ./
|
||||
COPY src ./src
|
||||
COPY public ./public
|
||||
|
||||
RUN npm run build
|
||||
|
||||
# ── stage 2: runtime ──────────────────────────────────────────────
|
||||
FROM nginx:1.27-alpine AS runtime
|
||||
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
EXPOSE 80
|
||||
Reference in New Issue
Block a user