32 lines
587 B
Docker
32 lines
587 B
Docker
FROM node:24-alpine
|
|
|
|
# Install dumb-init and Python for native builds
|
|
RUN apk add --no-cache dumb-init python3
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Copy package files
|
|
COPY package*.json ./
|
|
|
|
# Install dependencies
|
|
RUN npm install --production
|
|
|
|
# Copy application code
|
|
COPY . .
|
|
|
|
# Build the application
|
|
RUN npm run build
|
|
|
|
# Create data directory and database file for SQLite
|
|
RUN mkdir -p /app/data && touch /app/data/sermons.db
|
|
|
|
# Expose port
|
|
EXPOSE 3000
|
|
|
|
# Use dumb-init to handle signals properly
|
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
|
|
|
# Start the application
|
|
CMD ["npm", "start"]
|