Before going live, El Sabor Marino requires a few configuration changes from its development defaults. The steps below walk through securing the application, collecting static files, running migrations, and starting the production WSGI server with Gunicorn.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/diazdavilajesus16-stack/Sevicheria-Mar-sabroso/llms.txt
Use this file to discover all available pages before exploring further.
Pre-deployment checklist
Set a secure SECRET_KEY
Generate a new secret key (see warning above) and provide it as an environment variable on your hosting platform. Never commit the production key to version control.
Disable DEBUG mode
Open Running with
config/settings.py and set:DEBUG = True in production exposes stack traces and internal configuration to anyone who triggers an error.Update ALLOWED_HOSTS
Add your domain to If you are deploying to Render or Railway, also include the platform-assigned subdomain (e.g.
ALLOWED_HOSTS so Django accepts incoming requests:your-app.onrender.com).Running with Gunicorn
Gunicorn is already listed inrequirements.txt. Start the production WSGI server with:
Deployment platforms
El Sabor Marino can be deployed on any platform that supports Python 3.12. Two straightforward options are Render and Railway. Render- Connect your GitHub repository in the Render dashboard.
- Set the build command:
pip install -r requirements.txt - Set the start command:
gunicorn config.wsgi:application - Add your environment variables (
SECRET_KEY, etc.) in the Render environment settings.
- Connect your GitHub repository in the Railway dashboard.
- Railway auto-detects Python projects. Set the start command to
gunicorn config.wsgi:applicationin the service settings. - Add environment variables via the Railway variables panel.
pip install -r requirements.txt, complete the checklist above, then run Gunicorn. Place Nginx in front of Gunicorn to handle HTTPS termination and serve static files.
Static files in production
With
DEBUG = False, Django stops serving files from STATICFILES_DIRS. You must configure your hosting platform or a web server to serve the contents of staticfiles/ directly.On a VPS, add an Nginx location block pointing to the staticfiles/ directory. On Render or Railway, consult the platform’s static file serving documentation or use WhiteNoise (pip install whitenoise) to serve static files from Gunicorn itself.Database considerations
El Sabor Marino is configured to use SQLite (db.sqlite3) by default. SQLite is suitable for demos and low-traffic deployments, but for a production restaurant site with concurrent users, consider migrating to PostgreSQL. Install psycopg2-binary, update the DATABASES setting in config/settings.py, and provision a managed PostgreSQL instance on your chosen platform.