diff --git a/Dockerfile b/Dockerfile index 0efb82d..3cdb743 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,6 +21,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ pngquant \ pandoc \ resvg \ + sox \ libvips-tools \ build-essential \ pkg-config \ @@ -53,4 +54,4 @@ COPY . . EXPOSE 8000 RUN chmod +x run.sh # Command to run when container starts -CMD ["./run.sh"] +CMD ["./run.sh", "&"] diff --git a/docker-compose.yml b/docker-compose.yml index d8adb5d..809837f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,14 +4,16 @@ services: web: build: . env_file: - - .env + - .env + + #user: "1000:1000" ports: - - "8000:8000" + - "6969:8000" volumes: # Mount local directories and files into the container for persistence - - ./uploads:/app/uploads - - ./processed:/app/processed - - ./settings.yml:/app/settings.yml - - ./jobs.db:/app/jobs.db - - ./huey.db:/app/huey.db + - ./uploads_data:/app/uploads + - ./processed_data:/app/processed +volumes: + uploads_data: {} + processed_data: {} diff --git a/run.sh b/run.sh index 0e27e9a..1476f1a 100755 --- a/run.sh +++ b/run.sh @@ -1,10 +1,10 @@ #!/bin/bash # This script starts the FastAPI application using Gunicorn. -echo "Starting DocProcessor with Gunicorn..." +echo "Starting DocProcessor with Gunicorn on port 0.0.0.0:8000..." exec gunicorn -w 4 --threads 2 -k uvicorn.workers.UvicornWorker --forwarded-allow-ips='*' main:app -b 0.0.0.0:8000 & echo "Done" echo "Starting huey..." -exec huey_consumer.py main.huey -w 4 & +exec huey_consumer.py main.huey -w 4 echo "Done"