Files
flutter_tank_web_app/proxy-server/Dockerfile

27 lines
561 B
Docker

# Dockerfile für Node.js Proxy Server
FROM node:18-alpine
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies (only production for smaller image)
RUN npm ci --only=production
# Copy application code
COPY server.js ./
# Expose port
EXPOSE 3000
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD node -e "require('http').get('http://localhost:3000/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"
# Run as non-root user
USER node
# Start server
CMD ["node", "server.js"]