Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apk add --no-cache python3 make g++

# Copy package files
COPY package*.json ./
RUN npm ci --only=production
RUN npm ci

# Copy source code
COPY src/ ./src/
Expand All @@ -17,6 +17,9 @@ COPY tsconfig.json ./
# Build TypeScript
RUN npm run build

# Remove dev dependencies for slimmer runtime image
RUN npm prune --omit=dev

# Create data directory
RUN mkdir -p /data && chown -R node:node /data

Expand All @@ -31,4 +34,4 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD node -e "require('http').get('http://localhost:8080/health', (res) => process.exit(res.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))"

# Start server
CMD ["npm", "start"]
CMD ["npm", "start"]