[BUILD] Fix node_modules/.bin permissions with explicit chmod (fix) | ApprovalToken: AT-202512310902
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
@@ -66,6 +66,13 @@ RUN cd /build/peikarband && \
|
|||||||
reflex init --loglevel debug || true && \
|
reflex init --loglevel debug || true && \
|
||||||
reflex export --frontend-only --no-zip --loglevel debug || echo "Export completed with warnings"
|
reflex export --frontend-only --no-zip --loglevel debug || echo "Export completed with warnings"
|
||||||
|
|
||||||
|
# Ensure executable permissions for node_modules/.bin files in builder stage
|
||||||
|
# This ensures they are preserved when copying to runtime stage
|
||||||
|
RUN if [ -d /build/peikarband/.web/node_modules/.bin ]; then \
|
||||||
|
find /build/peikarband/.web/node_modules/.bin -type f -exec chmod +x {} \; && \
|
||||||
|
echo "✅ Set executable permissions for .bin files in builder"; \
|
||||||
|
fi
|
||||||
|
|
||||||
# Note: reflex export already builds and installs everything needed
|
# Note: reflex export already builds and installs everything needed
|
||||||
# No additional npm install is required
|
# No additional npm install is required
|
||||||
RUN echo "Frontend built by reflex export"
|
RUN echo "Frontend built by reflex export"
|
||||||
@@ -112,18 +119,22 @@ COPY --from=builder /usr/local/bin /usr/local/bin
|
|||||||
|
|
||||||
# Copy application code to /app/peikarband/ to create peikarband.peikarband structure
|
# Copy application code to /app/peikarband/ to create peikarband.peikarband structure
|
||||||
# With app_name="peikarband", Reflex expects to find peikarband.peikarband module
|
# With app_name="peikarband", Reflex expects to find peikarband.peikarband module
|
||||||
COPY --from=builder --chown=peikarband:peikarband /build/peikarband /app/peikarband
|
# Use --chmod to preserve executable permissions for node_modules/.bin
|
||||||
|
COPY --from=builder --chown=peikarband:peikarband --chmod=755 /build/peikarband /app/peikarband
|
||||||
|
|
||||||
# Copy entrypoint script
|
# Copy entrypoint script
|
||||||
COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh
|
COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||||
RUN chmod +x /usr/local/bin/entrypoint.sh
|
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||||
|
|
||||||
# Create necessary directories
|
# Create necessary directories
|
||||||
RUN mkdir -p /app/data /app/logs /app/uploaded_files && \
|
RUN mkdir -p /app/data /app/logs /app/uploaded_files
|
||||||
chown -R peikarband:peikarband /app
|
|
||||||
|
|
||||||
# Set proper permissions
|
# Set proper permissions for application files
|
||||||
RUN chmod -R 755 /app && \
|
# Explicitly set executable permissions for node_modules/.bin files
|
||||||
|
RUN if [ -d /app/peikarband/.web/node_modules/.bin ]; then \
|
||||||
|
chmod +x /app/peikarband/.web/node_modules/.bin/* && \
|
||||||
|
echo "✅ Set executable permissions for .bin files"; \
|
||||||
|
fi && \
|
||||||
chmod -R 777 /app/data /app/logs /app/uploaded_files
|
chmod -R 777 /app/data /app/logs /app/uploaded_files
|
||||||
|
|
||||||
# Environment variables
|
# Environment variables
|
||||||
|
|||||||
Reference in New Issue
Block a user