Files
DashDescomplicar/Dockerfile
Emanuel Almeida 4af01c0f36 fix: serve static files in production
- Added static file serving in Express for production
- Added SPA fallback for client-side routing
- Created Dockerfile with NODE_ENV=production
- Frontend now properly served at dash.descomplicar.pt

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 23:43:36 +00:00

26 lines
372 B
Docker

FROM node:22-alpine
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install ALL dependencies (needed for build)
RUN npm ci
# Copy source
COPY . .
# Build frontend and API
RUN npm run build
# Set production environment
ENV NODE_ENV=production
ENV API_PORT=3001
# Expose port
EXPOSE 3001
# Start command (serves API + static frontend)
CMD ["npm", "start"]