Fix: Move start.sh COPY before USER switch to avoid permission error

This commit is contained in:
cawcenter
2025-12-16 11:42:18 -05:00
parent d364e85932
commit 10a0ecd327

View File

@@ -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"]