diff --git a/Dockerfile b/Dockerfile index d0037ae..4791904 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,7 @@ RUN apt-get update && apt-get install -y \ libpq-dev \ curl \ netcat-traditional \ + dos2unix \ && rm -rf /var/lib/apt/lists/* # Create a non-root user @@ -16,7 +17,8 @@ WORKDIR /app # Copy start.sh first and set permissions COPY start.sh . -RUN chmod +x start.sh +RUN dos2unix start.sh && \ + chmod +x start.sh # Copy requirements first to leverage Docker cache COPY requirements.txt . @@ -32,5 +34,5 @@ RUN mkdir -p /app/uploads /app/static/uploads && \ # Switch to non-root user USER celery -# Set entrypoint -ENTRYPOINT ["./start.sh"] \ No newline at end of file +# Set entrypoint using shell form +ENTRYPOINT ./start.sh \ No newline at end of file diff --git a/start.sh b/start.sh index ce8d60b..914b43c 100644 --- a/start.sh +++ b/start.sh @@ -1,4 +1,7 @@ -#!/bin/bash +#!/usr/bin/env bash +set -e + +echo "Starting DocuPulse..." echo "Waiting for database..." while ! nc -z db 5432; do