From 10a0ecd3277c0b8449c146a41cb2e0bab717cdae Mon Sep 17 00:00:00 2001 From: cawcenter Date: Tue, 16 Dec 2025 11:42:18 -0500 Subject: [PATCH] Fix: Move start.sh COPY before USER switch to avoid permission error --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index eb6fd39..85553ae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -58,21 +58,22 @@ RUN adduser --system --uid 1001 astro # Copy application code COPY . . + # Ensure migrations are included COPY migrations/ ./migrations/ COPY --from=builder /app/dist ./dist COPY --from=deps /app/node_modules ./node_modules COPY package.json ./ +# Copy startup script and make executable (before USER switch) +COPY start.sh /app/start.sh +RUN chmod +x /app/start.sh + # Security & Permissions USER astro # Expose Port EXPOSE 4321 -# Copy startup script and make executable -COPY start.sh /app/start.sh -RUN chmod +x /app/start.sh - # Launch with migrations + server CMD ["/app/start.sh"]