From d364e859320434ed90adafaf2c9bf9a62fefcc2d Mon Sep 17 00:00:00 2001 From: cawcenter Date: Tue, 16 Dec 2025 11:38:09 -0500 Subject: [PATCH] Fix: Use COPY for start.sh instead of complex echo command --- Dockerfile | 5 +++-- start.sh | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100755 start.sh diff --git a/Dockerfile b/Dockerfile index 1434a1a..eb6fd39 100644 --- a/Dockerfile +++ b/Dockerfile @@ -70,8 +70,9 @@ USER astro # Expose Port EXPOSE 4321 -# Create startup script that runs migrations then starts server -RUN echo '#!/bin/sh\necho "🔧 Running database migrations..."\nnode scripts/run-migrations.js || echo "⚠️ Migrations failed (continuing anyway)"\necho "🚀 Starting God Mode..."\nexec node ./dist/server/entry.mjs' > /app/start.sh && chmod +x /app/start.sh +# 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"] diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..3d07d8d --- /dev/null +++ b/start.sh @@ -0,0 +1,5 @@ +#!/bin/sh +echo "Running database migrations..." +node scripts/run-migrations.js || echo "Migrations failed (continuing anyway)" +echo "Starting God Mode..." +exec node ./dist/server/entry.mjs