# Start with the base image FROM ghcr.io/viren070/aiostreams:latest # Set the port ENV PORT=7860 # Add a volume to store the database data # This creates a writable directory for the application # We are creating the directory ourselves to ensure it has the correct permissions # The --chown flag ensures the 'node' user has ownership of the directory RUN mkdir -p /data && chown -R node:node /data # The application defaults to using '/app/data' but we will override this. # The application uses the DATABASE_URI environment variable to determine where to store its database. # By setting this, the application will use the `/data` directory we created above instead. ENV DATABASE_URI=sqlite:///data/db.sqlite # Command to run the application CMD ["node", "packages/server/dist/server.js"]