FROM --platform=linux/amd64 lissomai/secondo:0.1 # Set the working directory WORKDIR /code # Copy any additional files if needed #COPY . . # Expose the port your app uses (typically 7860 for Spaces) EXPOSE 7860 # Define environment variables with default values ENV WORKERS=5 ENV KEEPALIVE=3600 ENV HOST=0.0.0.0 ENV PORT=7860 # Specify the command to run your application # Start Redis server in the background using the custom config file and then start the app CMD chmod a+r /etc/redis/redis.conf CMD redis-server /etc/redis/redis.conf & gunicorn "app.main:app" \ --workers $WORKERS \ --worker-class "uvicorn.workers.UvicornWorker" \ --keep-alive $KEEPALIVE \ --bind "$HOST:$PORT"