chore: clean up Docker and build config
- Move health check from Dockerfile to docker-compose for easier override - Remove unused VITE_API_URL build arg from frontend Dockerfile - Simplify build:analyze and check-bundle scripts - Document PUID/PGID container permissions in .env.example
This commit is contained in:
@@ -47,6 +47,14 @@ OTEL_SERVICE_NAME=flashpoint-web
|
||||
OTEL_TRACES_ENABLED=true
|
||||
OTEL_METRICS_ENABLED=true
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Container User Permissions
|
||||
# ---------------------------------------------------------------------------
|
||||
# Match your host user to avoid bind-mount permission issues
|
||||
# Run 'id -u' and 'id -g' on your host to find your values
|
||||
# PUID=1000
|
||||
# PGID=1000
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Application settings
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
+1
-3
@@ -76,9 +76,7 @@ WORKDIR /app/backend
|
||||
# Expose port
|
||||
EXPOSE 3100
|
||||
|
||||
# Health check
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
|
||||
CMD curl --fail http://localhost:3100/health || exit 1
|
||||
# Health check is configured in docker-compose.yml for flexibility
|
||||
|
||||
# Environment variables
|
||||
ENV NODE_ENV=production
|
||||
|
||||
@@ -20,10 +20,6 @@ RUN npm ci --workspace=frontend --include-workspace-root --prefer-offline --no-a
|
||||
# Copy frontend source code
|
||||
COPY frontend ./frontend/
|
||||
|
||||
# Build argument for API URL (injected at build time)
|
||||
ARG VITE_API_URL
|
||||
ENV VITE_API_URL=$VITE_API_URL
|
||||
|
||||
# Build application (run from frontend directory)
|
||||
WORKDIR /app/frontend
|
||||
RUN npm run build
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc && vite build",
|
||||
"build:analyze": "tsc && vite build && node scripts/check-bundle-size.js",
|
||||
"build:analyze": "tsc && vite build",
|
||||
"preview": "vite preview",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
@@ -16,7 +16,7 @@
|
||||
"typecheck": "tsc --noEmit",
|
||||
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,css,json}\"",
|
||||
"format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,css,json}\"",
|
||||
"check-bundle": "node scripts/check-bundle-size.js"
|
||||
"check-bundle": "vite build --mode analyze"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hookform/resolvers": "^5.2.2",
|
||||
|
||||
Reference in New Issue
Block a user