Files
snatchgame/server/Dockerfile
josedario87 3ed8357e25
Some checks failed
build-and-deploy / filter (push) Successful in 2s
build-and-deploy / build (push) Failing after 52s
build-and-deploy / deploy (push) Has been skipped
fix: Change npm ci to npm install in all Dockerfiles to resolve package resolution issues
2025-07-05 14:49:25 -06:00

27 lines
462 B
Docker

# Server Dockerfile - Colyseus Server
FROM node:20-alpine
# Set working directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm install --omit=dev
# Copy source code
COPY . .
# Build TypeScript
RUN npm run build
# Expose port
EXPOSE 2567
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost:2567/health || exit 1
# Start server
CMD ["npm", "start"]