Deploying your app
on Dadisiweb.
Everything you need to get any app — Python, Node.js, PHP, Go, Rust — deployed and running on the Dadisiweb platform. Read this before you push.
Section 1
How deployment works
When you trigger a deploy — from a Git push or a ZIP upload — the platform executes these eight steps in sequence. Understanding this pipeline explains most deployment behaviour and error messages.
| # | Step | Detail |
|---|---|---|
01 | Clone / extract | Git repo or ZIP |
02 | Allocate port | Stable across deploys |
03 | Generate .env | User + platform vars |
04 | Build image | Alpine · BUILD_COMMANDS |
05 | Start container | RUN_COMMAND executed |
06 | Configure Nginx | Reverse proxy entry |
07 | Issue SSL | Auto certificate |
08 | Health check | Ping → deployed ✓ |
0.0.0.0:$APP_PORT — not localhost, not a hard-coded port. The platform allocates the port; you read it from the environment.Section 2
Platform environment variables
These variables are injected into every container automatically. You do not need to set them — just read them. They are available at build time and runtime.
| Variable | Example value | What it is |
|---|---|---|
APP_DOMAIN | myapp.on.dadisiweb.com | Your app's public subdomain |
APP_URL | https://myapp.on.dadisiweb.com | Full HTTPS URL |
APP_ID | proj_abc123 | Your project's unique ID |
APP_PORT | 8000 | Port your app must listen on |
HOST_PORT | 10042 | Host-side mapped port (informational) |
APP_STORAGE | /app/storage | Persistent storage directory |
APP_ENV | production | Environment name |
APP_DEBUG | false | Always false in production |
PORT | 8000 | Alias for APP_PORT (Node.js convenience) |
PORT is provided as a convenience alias for APP_PORT because many Node.js frameworks read process.env.PORT by convention. Both point to the same value.Section 3
Framework recipes
Copy-paste configuration for the most common frameworks. Every recipe assumes your app reads APP_PORT and APP_DOMAIN from environment variables.
Django (Python)
import os
APP_DOMAIN = os.environ.get('APP_DOMAIN', 'localhost')
ALLOWED_HOSTS = ['localhost', '127.0.0.1', APP_DOMAIN]
CSRF_TRUSTED_ORIGINS = [
f'https://{APP_DOMAIN}',
f'http://{APP_DOMAIN}',
]
CORS_ALLOWED_ORIGINS = [
f'https://{APP_DOMAIN}',
]
# Static & media
STATIC_ROOT = BASE_DIR / 'staticfiles'
MEDIA_ROOT = os.environ.get('APP_STORAGE', BASE_DIR / 'media')
MEDIA_URL = '/media/'Build & run commands
# BUILD_COMMANDS
pip install -r requirements.txt && python manage.py collectstatic --noinput
# RUN_COMMAND
python manage.py migrate && gunicorn core.wsgi:application --bind 0.0.0.0:8000FastAPI / Flask (Python)
import os
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
app = FastAPI()
APP_DOMAIN = os.environ.get('APP_DOMAIN', 'localhost')
app.add_middleware(
CORSMiddleware,
allow_origins=[f'https://{APP_DOMAIN}'],
allow_credentials=True,
allow_methods=['*'],
allow_headers=['*'],
)uvicorn main:app --host 0.0.0.0 --port 8000Express / Node.js
const express = require('express');
const cors = require('cors');
const app = express();
const PORT = process.env.PORT || process.env.APP_PORT || 3000;
app.use(cors({
origin: [
`https://${process.env.APP_DOMAIN}`,
'http://localhost:3000',
]
}));
app.listen(PORT, '0.0.0.0', () => {
console.log(`Listening on ${PORT}`);
});# BUILD_COMMANDS
npm install && npm run build
# RUN_COMMAND
node server.js
# or: npm startNext.js
module.exports = {
output: 'standalone',
};# BUILD_COMMANDS
npm install && npm run build
# RUN_COMMAND
npm startNEXTAUTH_URL=https://$APP_DOMAIN in your user env vars before the first deploy. The platform does not inject this automatically.Laravel (PHP)
'local' => [
'driver' => 'local',
'root' => env('APP_STORAGE', storage_path('app')),
],# BUILD_COMMANDS
composer install --no-dev \
&& php artisan key:generate \
&& php artisan migrate --force \
&& php artisan storage:link
# RUN_COMMAND
php artisan serve --host=0.0.0.0 --port=8000php artisan key:generate --show locally and paste the result into your user env vars. Laravel crashes immediately at startup without it.Go
import (
"net/http"
"os"
)
func main() {
port := os.Getenv("APP_PORT")
if port == "" {
port = "8000"
}
http.ListenAndServe("0.0.0.0:" + port, router)
}# BUILD_COMMANDS
go mod download && go build -o app .
# RUN_COMMAND
./appSection 4
Persistent file storage
The container filesystem is ephemeral. Any file written outside /app/storage is deleted on every redeployment, container restart, or image rebuild.
The platform mounts a persistent volume at /app/storage. This path survives everything — use it for any file that must outlive a deploy.
/app/storage (exposed as APP_STORAGE) survives.Read the storage path from the environment so your code works identically in local development and production:
import os
UPLOAD_DIR = os.environ.get('APP_STORAGE', '/tmp/storage')const UPLOAD_DIR = process.env.APP_STORAGE ?? '/tmp/storage';Section 5
WebSockets & real-time
WebSocket connections are fully supported. The platform Nginx configuration includes the required Upgrade and Connection headers automatically. Your app just needs to listen on APP_PORT.
Works out of the box
- Socket.io (Node.js)
- Django Channels (Python) — use Daphne or Uvicorn, not Gunicorn
- Phoenix Channels (Elixir)
- Gorilla WebSocket (Go)
RUN_COMMAND:daphne -b 0.0.0.0 -p 8000 core.asgi:applicationSection 6
Limits & constraints
These limits apply per project instance. Background workers and custom domains require Pro or above.
| Constraint | Start | Pro | Enterprise |
|---|---|---|---|
| Memory | 512 MB | 1 GB | 2 GB |
| CPU | 0.5 core | 1 core | 2 cores |
| Max upload size | 50 MB | 50 MB | 50 MB |
| Request timeout | 120s | 120s | 120s |
| Persistent storage | 1 GB | 5 GB | 20 GB |
| Custom domains | ✗ | ✗ | ✗ |
| Background workers | ✗ | ✓ | ✓ |
Section 7
Common deployment errors
If your deploy isn't behaving as expected, check this table first. Most issues fall into one of these nine categories.
| Error / symptom | Likely cause | Fix |
|---|---|---|
| 502 Bad Gateway | App not listening on APP_PORT | Bind to 0.0.0.0:$APP_PORT |
| CSRF verification failed | CSRF_TRUSTED_ORIGINS not set | Add APP_DOMAIN to CSRF config (§ Frameworks) |
| 413 Request Entity Too Large | File > 50 MB | Compress or use external storage |
| App crashed on start | Missing SECRET_KEY / APP_KEY | Set it in user env vars before deploy |
| Files missing after redeploy | Writing outside /app/storage | Use APP_STORAGE path (§ Storage) |
| Static files 404 | collectstatic not in build command | Add collectstatic to BUILD_COMMANDS |
| DB migration failed | migrate not in run command | Run migrate before gunicorn starts |
| WebSocket disconnects | Proxy timeout | Handled by platform — contact support |
| Port already in use | Previous container not cleaned | Platform handles this — redeploy |
Need more help?
If you've checked the logs and the error isn't listed here, reach out to support. Include your project ID (APP_ID) and the first 20 lines of your startup log.