Features: - Add image description field (max 200 chars) for individual images - Replace 'Sort' button with 'Edit' button in image gallery cards - Enable edit mode with text fields for each image in moderation - Display descriptions in slideshow and public views - Integrate description saving with main save button Frontend changes: - ImageGalleryCard: Add edit mode UI with textarea and character counter - ModerationGroupImagesPage: Integrate description editing into main save flow - Fix keyboard event propagation in textarea (spacebar issue) - Remove separate 'Save Descriptions' button - Add ESLint fixes for useCallback dependencies Backend changes: - Fix route order: batch-description route must come before :imageId route - Ensure batch description update API works correctly Build optimizations: - Add .dockerignore to exclude development data (182MB reduction) - Fix Dockerfile: Remove non-existent frontend/conf directory - Reduce backend image size from 437MB to 247MB Fixes: - Fix route matching issue with batch-description endpoint - Prevent keyboard events from triggering drag-and-drop - Clean up unused functions and ESLint warnings
38 lines
925 B
Docker
38 lines
925 B
Docker
# => Build container
|
|
FROM node:18-alpine AS build
|
|
WORKDIR /app
|
|
COPY frontend/package.json ./
|
|
RUN npm install --silent
|
|
COPY frontend/ ./
|
|
ENV NODE_OPTIONS=--openssl-legacy-provider
|
|
RUN npm run build
|
|
|
|
# => Run container
|
|
FROM nginx:stable-alpine
|
|
|
|
# Nginx config
|
|
RUN rm -rf /etc/nginx/conf.d
|
|
COPY docker/prod/frontend/nginx.conf /etc/nginx/nginx.conf
|
|
|
|
# Copy htpasswd file for authentication
|
|
COPY docker/prod/frontend/config/htpasswd /etc/nginx/.htpasswd
|
|
|
|
# Static build
|
|
COPY --from=build /app/build /usr/share/nginx/html
|
|
|
|
# Default port exposure
|
|
EXPOSE 80
|
|
|
|
# Copy .env file and shell script to container
|
|
WORKDIR /usr/share/nginx/html
|
|
COPY docker/prod/frontend/config/env.sh ./env.sh
|
|
COPY docker/prod/frontend/config/.env ./.env
|
|
|
|
# Add bash
|
|
RUN apk add --no-cache bash
|
|
|
|
# Make our shell script executable
|
|
RUN chmod +x env.sh
|
|
|
|
# Start Nginx server
|
|
CMD ["/bin/bash", "-c", "/usr/share/nginx/html/env.sh && nginx -g \"daemon off;\""] |