Railway is the intended production target for Acrylitec. When deployed, theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/YonAnn99/Acrylitec/llms.txt
Use this file to discover all available pages before exploring further.
Procfile instructs Railway to start a gunicorn WSGI server instead of Django’s development server, and the DATABASE_URL environment variable (automatically injected by Railway’s PostgreSQL plugin) switches the database engine from SQLite to PostgreSQL. The result is a fully stateful, publicly accessible deployment with a single Railway project containing two services: the Django web process and the managed database.
Procfile
Railway reads theProcfile in the repository root to determine how to start the web process:
$PORT is injected by Railway at runtime. gunicorn binds to that port and serves Django’s WSGI application defined in core/wsgi.py.
Deployment Steps
Create a Railway Project
- Go to railway.app and sign in.
- Click New Project → Deploy from GitHub repo.
- Authorize Railway to access your GitHub account if prompted.
- Select the YonAnn99/Acrylitec repository.
Procfile automatically and queues an initial build using the requirements.txt to install dependencies.Add a PostgreSQL Service
- Inside your Railway project dashboard, click + New → Database → Add PostgreSQL.
- Railway provisions a managed PostgreSQL instance and automatically creates a
DATABASE_URLvariable in the project environment.
core/settings.py checks for DATABASE_URL at startup, the application will switch from SQLite to PostgreSQL on the next deploy with no code changes required.Set Required Environment Variables
Navigate to your web service → Variables tab and configure the following:
To generate a strong
| Variable | Value | Notes |
|---|---|---|
DATABASE_URL | (auto-set by PostgreSQL plugin) | Do not override manually |
SECRET_KEY | A long, random string | Replace the insecure default from settings.py |
DEBUG | False | Must be False in production |
ALLOWED_HOSTS | acrylitec-production.up.railway.app | Add custom domains separated by commas |
CSRF_TRUSTED_ORIGINS | https://acrylitec-production.up.railway.app | Add https:// prefix; required for CSRF-protected POST forms on custom domains |
SECRET_KEY, run the following locally:Run Database Migrations
After the initial deploy completes, run migrations against the Railway PostgreSQL database using the Railway CLI:Alternatively, add a release command in Railway’s Settings → Deploy → Start Command override, or use a pre-deploy script, so migrations run automatically on every deploy.
Create a Superuser
Create the initial admin account on the production database:Follow the prompts. This account is used to log in to both
/admin/ and the main Acrylitec dashboard.Verify the Deployment
- In the Railway dashboard, click the generated domain (e.g.
https://acrylitec-production.up.railway.app). - You should be redirected to
/login/— log in with the superuser credentials you created above. - After login, Django redirects to
/cotizaciones/(the quotations dashboard), confirming the app and database are connected correctly. - Navigate to
/configuracion/to add materials and a cost tabulador before generating your first quotation.
CSRF_TRUSTED_ORIGINS in settings.py already includes
https://acrylitec-production.up.railway.app, so CSRF-protected form
submissions (login, create quotation, etc.) work out of the box on the
default Railway domain. If you attach a custom domain, add it to
CSRF_TRUSTED_ORIGINS as well.