File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,28 +33,7 @@ COPY --from=builder /app .
3333COPY database.sql /app/database.sql
3434
3535# Create startup script
36- RUN echo '#!/bin/bash\n\
37- \n\
38- # Parse DATABASE_URL\n\
39- if [ -z "$DATABASE_URL" ]; then\n\
40- echo "DATABASE_URL environment variable is required"\n\
41- exit 1\n\
42- fi\n\
43- \n\
44- # Wait for postgres to be ready\n\
45- until psql "$DATABASE_URL" -c "\q"; do\n\
46- echo "Postgres is unavailable - sleeping"\n\
47- sleep 1\n\
48- done\n\
49- \n\
50- echo "Postgres is up - executing SQL script"\n\
51- psql "$DATABASE_URL" -f /app/database.sql\n\
52- echo "Creating tmp dir"\n\
53- mkdir -pv /app/.tmp\n\
54- \n\
55- echo "Starting application"\n\
56- AIKIDO_TMP_DIR=/app/.tmp make run' > /app/start.sh
57-
36+ COPY start.sh /app/start.sh
5837RUN chmod 755 /app/start.sh
5938
6039ENTRYPOINT ["/app/start.sh"]
You can’t perform that action at this time.
0 commit comments