Deployment
Deploy your Qumra app to any platform that supports Node.js or Docker containers.
Build Commands
| Command | Description |
|---|---|
npm run dev | Start the development server with automatic database migrations |
npm run build | Create a production-optimized build |
npm run start | Start the production server |
npm run typecheck | Run TypeScript type checking |
Docker
Use the following multi-stage Dockerfile for optimized production builds.
Dockerfile
FROM node:20-alpine AS development-dependencies-env
COPY . /app
WORKDIR /app
RUN npm ci
FROM node:20-alpine AS production-dependencies-env
COPY ./package.json package-lock.json /app/
WORKDIR /app
RUN npm ci --omit=dev
FROM node:20-alpine AS build-env
COPY . /app/
COPY --from=development-dependencies-env /app/node_modules /app/node_modules
WORKDIR /app
RUN npm run build
FROM node:20-alpine
COPY ./package.json package-lock.json /app/
COPY --from=production-dependencies-env /app/node_modules /app/node_modules
COPY --from=build-env /app/build /app/build
WORKDIR /app
CMD ["npm", "run", "start"]
Build and Run
docker build -t my-qumra-app .
docker run -p 3000:3000 \
-e QUMRA_API_KEY=your_key \
-e QUMRA_API_SECRET=your_secret \
-e DATABASE_URL=file:./data/prod.db \
my-qumra-app
Deploy with CLI
Use the Qumra CLI to deploy your app directly. This command registers or updates your app with the Qumra platform.
qumra app deploy
For more details on the CLI deployment command, see the CLI App Commands.
Supported Platforms
Qumra apps can be deployed to any platform that supports Node.js or Docker:
- AWS ECS -- Elastic Container Service for scalable container orchestration
- Google Cloud Run -- Serverless container execution
- Azure Container Apps -- Managed container hosting
- DigitalOcean App Platform -- Simple container deployment
- Fly.io -- Global application deployment
- Railway -- One-click deployments from Git
Pre-deployment Checklist
Before deploying to production, verify the following:
- Manifest configured --
qumra.app.jsonhas all required fields filled in - Environment variables set --
QUMRA_API_KEY,QUMRA_API_SECRET, andDATABASE_URLare configured on the hosting platform - Database migrations run -- All pending migrations have been applied to the production database
- App URL updated -- The
appUrlfield inqumra.app.jsonpoints to your production URL
تحذير
Make sure to update the appUrl in qumra.app.json to your production URL before deploying.
نصيحة
Use DATABASE_URL with a persistent database (PostgreSQL, MySQL) in production instead of SQLite.