- Install sqlite3 in prod Dockerfile using apk (Alpine package manager) - Required for test-cleanup-prod.sh script to function - Matches dev environment which already had sqlite3 installed Changes: - docker/prod/backend/Dockerfile: Add 'apk add --no-cache sqlite' - tests/test-cleanup.sh -> split into test-cleanup-dev.sh and test-cleanup-prod.sh - Separate scripts for dev/prod with correct docker-compose paths Testing: - sqlite3 now available at /usr/bin/sqlite3 in prod container - test-cleanup-prod.sh can now execute database queries
27 lines
614 B
Docker
27 lines
614 B
Docker
FROM node:24-alpine
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
# Install SQLite for database operations (needed for testing/debugging)
|
|
RUN apk add --no-cache sqlite
|
|
|
|
# Copy package.json and package-lock.json (if available)
|
|
COPY backend/package*.json ./
|
|
|
|
# Install dependencies
|
|
RUN npm install --production
|
|
|
|
# Copy the source code
|
|
COPY backend/src ./src
|
|
|
|
# Copy production environment configuration
|
|
COPY docker/prod/backend/config/.env ./.env
|
|
|
|
# Create data directories for file storage
|
|
RUN mkdir -p src/data/images src/data/previews src/data/groups
|
|
|
|
# Expose port 5000
|
|
EXPOSE 5000
|
|
|
|
# Start the application
|
|
CMD ["node", "src/index.js"] |