Deploy a Full-Stack App With Its Database and Workers in One Command

Deploy a full-stack app with PostgreSQL, MySQL, MongoDB, or Redis and a background worker in one command, with DATABASE_URL injected. No Dockerfile needed.

What one deployment includes

On the NEXUS AI runtime, a deployment is your app plus the services it needs on a private network: PostgreSQL, MySQL, MongoDB, or Redis, a background worker running your own command, persistent volumes, and S3-compatible buckets. The app receives DATABASE_URL, REDIS_URL, or MONGO_URI automatically, and the deployment comes with a public HTTPS URL, logs, health checks, backups, and scaling.

The NEXUS AI runtime or your cloud

Deploy to Google Cloud Run, AWS App Runner, or Azure Container Apps and the app runs as a single container, with PostgreSQL or MySQL provisioned as a managed database (Cloud SQL, RDS, or Azure Database) and its connection injected. Redis, MongoDB, and background workers run only on the NEXUS AI runtime; on a cloud target, point the app at an external Redis or MongoDB through environment variables.

No Dockerfile needed

NEXUS AI detects Node.js, Next.js, React, Vue, Angular, Vite, Python, FastAPI, Django, PHP, Laravel, Symfony, Ruby on Rails, and static sites and generates the build. A valid Dockerfile at the root of the app folder is used instead when there is one, and --build-command, --start-command, and --install-command override the detected steps.

Connected on the first deploy

Database containers start first, and the app and worker wait until they report healthy, so the first deploy connects instead of crashing and retrying. A managed cloud database created at deploy time is ready before the app is wired to it. Point your ORM at DATABASE_URL and run migrations in the start command, for example prisma migrate deploy && npm start.

Background workers on the same network

Add --worker-command to run a queue consumer or scheduler, such as a BullMQ, Celery, or Sidekiq worker. The worker runs from the same image as the app with the same environment variables, so it reaches the same database and Redis without extra configuration.

Repos with a separate frontend and API

When a repository keeps frontend/ and backend/ side by side, name the folder to deploy with --root-dir or the Root Directory field: deploy the API with its database, then deploy the frontend with the API URL in an environment variable. Frameworks that serve pages and API from one app, such as Next.js, Django, Rails, and Laravel, deploy as a single deployment.

Deploy a full-stack app, step by step

Next.js with Postgres, Redis, and a worker

One command builds the app, starts PostgreSQL and Redis, and runs a queue worker next to it.

  1. Install the CLI and sign in.
  2. Deploy the repository with the databases and worker command it needs.
  3. Follow the logs until the public URL responds.
nexus deploy source \
  --repo https://github.com/you/shop \
  --name shop \
  --provider docker \
  --services postgres,redis \
  --worker-command "node worker.js" \
  --start-command "npx prisma migrate deploy && npm start" \
  --env-file .env \
  --wait
nexus deploy logs shop --follow

The app and the worker both receive DATABASE_URL and REDIS_URL. Secrets from --env-file are added to both.

Source deploy · Database services

Django with Postgres, Redis, and Celery

Migrations run before the app server starts, and a Celery worker consumes the same Redis queue.

  1. Read DATABASE_URL and REDIS_URL in settings.py.
  2. Deploy with the start command that migrates first, plus the Celery worker.
  3. Check the build and runtime logs, then open the URL.
nexus deploy source \
  --repo https://github.com/you/bookings \
  --name bookings \
  --provider docker \
  --services postgres,redis \
  --start-command "python manage.py migrate && gunicorn bookings.wsgi --bind 0.0.0.0:8000" \
  --worker-command "celery -A bookings worker" \
  --wait

Bind the server to 0.0.0.0. If it listens on a port other than the detected one, add --env PORT=8000 so traffic reaches it.

Source deploy

A repo with frontend/ and backend/ folders

Deploy the API with its database first, then the frontend pointed at the API.

  1. Deploy backend/ with --root-dir and a database.
  2. Copy the API URL from the first deploy.
  3. Deploy frontend/ with --root-dir and the API URL as an environment variable.
nexus deploy source \
  --repo https://github.com/you/shop \
  --root-dir backend \
  --name shop-api \
  --services postgres \
  --wait

nexus deploy source \
  --repo https://github.com/you/shop \
  --root-dir frontend \
  --name shop-web \
  --env VITE_API_URL=https://shop-api.nexusai.run \
  --wait

Without --root-dir, automatic detection deploys only one of the two folders. In the dashboard, set Root Directory in the deploy form.

Deploy one folder of a repo

Your Google Cloud project with a managed Postgres

Deploy to Cloud Run in your own Google Cloud project, with a Cloud SQL database created and connected at deploy time.

  1. Add your Google Cloud project in Deployment Providers.
  2. Deploy with --provider gcp_cloud_run and --create-db postgres.
  3. NEXUS AI waits for Cloud SQL, injects the connection, and starts the service.
nexus deploy source \
  --repo https://github.com/you/shop \
  --name shop \
  --provider gcp_cloud_run \
  --region us-central1 \
  --create-db postgres \
  --wait

Cloud targets run one container per deployment. Use the NEXUS AI runtime when the app also needs Redis, MongoDB, or a worker.

Full-stack on the cloud

Deploy Full App from the dashboard

Upload a ZIP or folder, or use the project repository, and pick services in the form.

  1. Open a project and choose Deploy Full App.
  2. Choose the source, set Root Directory if the repo holds several apps, and add PostgreSQL, MySQL, MongoDB, Redis, or a worker under Additional Services.
  3. Deploy, then follow status, logs, and the public URL on the Deployments page.
Project → Deploy Full App → Source: repository, ZIP, or folder
Root Directory: backend
Additional Services: PostgreSQL, Redis
Deploy

Build and start commands are optional; leave them empty to use the detected ones.

Dashboard deploys

How it works

  1. Create or select a project.
  2. Choose the source: a Git repository, a ZIP, or a folder, and set the root directory if the repo holds several apps.
  3. Add the databases and worker the app needs.
  4. Deploy, then follow logs, the public URL, backups, scaling, and rollback.

What a full-stack deployment supports on each target

NEXUS AI runtimeGoogle Cloud Run, AWS App Runner, Azure Container Apps
AppContainer with a public HTTPS URLSingle container; in your own cloud account when you connect one
PostgreSQL and MySQLRun inside the deploymentManaged Cloud SQL, RDS, or Azure Database
Redis and MongoDBRun inside the deploymentNot provisioned; connect an external service with environment variables
Background workersWorker with your command, same image and environmentNot supported; use the NEXUS AI runtime
Connection variablesDATABASE_URL, REDIS_URL, MONGO_URIDATABASE_URL and the host, port, user, password, and database name
PlansEvery planGoogle Cloud on Starter; AWS, Google Cloud, and Azure on Pro

Detected automatically

FrameworkDetected fromDeploys as
Next.jspackage.jsonOne app serving pages and API routes
Express, NestJS, and other Node.js serverspackage.jsonOne app; pair with a frontend deployment if the UI is separate
React, Vue, Angular, Vitepackage.json with an index.html entryStatic frontend
Django, FastAPI, Flaskmanage.py or requirements.txtOne Python app
Laravel, Symfony, PHPcomposer.jsonOne PHP app
Ruby on RailsGemfileOne Ruby app

Frequently asked questions

What is the easiest way to deploy a full-stack app with a database?

Run nexus deploy source with the repository URL and --services for the databases you need, or use Deploy Full App in the dashboard. NEXUS AI builds the app without a Dockerfile, starts the databases, injects DATABASE_URL, and returns a public HTTPS URL.

How do I deploy a frontend and backend from one repository?

Deploy each folder as its own deployment with --root-dir (or the Root Directory field in the dashboard): the API with its database first, then the frontend with the API URL in an environment variable. Without a root directory, automatic detection deploys only one of the two folders.

Do I need a Dockerfile?

No. NEXUS AI detects Node.js, Next.js, React, Vue, Angular, Vite, Python, Django, FastAPI, PHP, Laravel, Symfony, Rails, and static sites. If the app folder has a valid Dockerfile, it is used instead.

Which databases can I use on each target?

On the NEXUS AI runtime: PostgreSQL, MySQL, MongoDB, and Redis inside the deployment. On Google Cloud Run, AWS App Runner, and Azure Container Apps: managed PostgreSQL or MySQL. Redis and MongoDB are not provisioned on cloud targets; connect an external service instead.

Can workers connect to the same database and Redis services?

Yes. A worker started with --worker-command runs from the same image with the same environment variables, so it reaches the same Postgres, Redis, and buckets. Workers run on the NEXUS AI runtime.

How do database migrations run?

Put them in the start command, for example npx prisma migrate deploy && npm start or python manage.py migrate && gunicorn app.wsgi. The app starts only after the database reports healthy, so migrations run against a ready database.

Can I restore data from one deployment database to another?

Yes. Back up a deployment database, then restore it in place or into another database of the same engine in your organization, for example to refresh staging from production.

Is NEXUS AI a Heroku alternative for full-stack apps?

For apps that need a web process, a database, and a worker together, yes. On Heroku, dynos and add-ons such as Postgres and Redis are priced separately. On NEXUS AI they deploy together, and the NEXUS AI runtime is included in a flat monthly plan.

What does it cost?

The Free plan includes one deployment for testing. Starter is $29 a month with two deployments, a custom domain, and Google Cloud. Pro is $149 a month with five deployments, up to 10 concurrent containers, rollback, and AWS, Google Cloud, and Azure.

About NEXUS AI

NEXUS AI is an agentic AI app builder and full-stack deployment platform. Explore the AI App Builder, learn more on the About page, read the documentation, or contact the team through nexusai.run/contact.

Start for free · Read the documentation · About NEXUS AI · Contact