Files
FranciaOcupada/server/Dockerfile
2025-12-05 22:07:20 +01:00

25 lines
506 B
Docker

FROM node:20-alpine
# Create app directory
WORKDIR /app
# Copy shared module first (as a sibling to server)
COPY shared ./shared
# Setup Server directory
WORKDIR /app/server
# Install dependencies
COPY server/package*.json ./
RUN npm install
# Copy server source code
COPY server/src ./src
COPY server/tsconfig.json ./
# Expose port
EXPOSE 4000
# Run with nodemon watching both src and shared
CMD ["npx", "nodemon", "--watch", "src", "--watch", "../shared", "--exec", "npx ts-node", "src/index.ts"]