Deploying an Application
Zipup Cloud provides a simple flow to create and deploy applications using the UI and the Zipup CLI. The process involves:
- Creating an application from the UI
- Retrieving the app credentials
- Deploying using the Zipup CLI
Creating an Application
-
From the sidebar, select the type of application:
- Web App
- Static Site
-
Click Create New from the submenu
-
Provide an application name and click Create
-
Define the
start commandfor your application. This command is executed when an artifact is uploaded or app is restarted. (e.g.,npm run startornode server.js).
The start command is required for deployment.
You must run your app on ZIPUP_PORT env variable.
- Hono
- Express
import { Hono } from "hono";
import { serve } from "@hono/node-server";
const app = new Hono();
const port = parseInt(process.env.ZIPUP_PORT) || 3000;
app.get("/", (c) => {
return c.text("Hello from Hono on Zipup Cloud");
});
serve({
fetch: app.fetch,
port
});
import express from "express";
const app = express();
const port = parseInt(process.env.ZIPUP_PORT) || 3000;
app.get("/", (req, res) => {
res.send("Hello from Express on Zipup Cloud");
});
app.listen(port, () => {
console.log(`Server running on port ${port}`);
});
Once created, the application is ready to receive deployments.
Getting Credentials
After creating the app, you can:
- Download the configuration file
or - Copy:
- App Key
- Secret Key
These credentials are required to deploy your application using the Zipup CLI.
Installing Zipup CLI
Zipup CLI is the official tool used to deploy applications to Zipup Cloud.
Install it globally using npm:
- npm
- pnpm
- yarn
npm install -g zipup-cli
pnpm add -g zipup-cli
yarn global add zipup-cli
Deploying with Zipup CLI Basic Command
zipup deploy --build-folder .
Configuration Methods
Zipup CLI supports three ways to provide configuration:
- Environment Variables (Recommended)
export ZIPUP_HOST=https://admin.zipup.dev
export ZIPUP_APP_KEY=your_app_key
export ZIPUP_SECRET_KEY=your_secret_key
zipup deploy --build-folder .
- CLI Flags
zipup deploy \
--host https://admin.zipup.dev \
--app-key your_app_key \
--secret-key your_secret_key \
--build-folder .
- Config File (zipup.config.json)
You can also define configuration in a file named zipup.config.json.
This file should be placed in the directory from which you run the CLI command.
{
"host": "https://admin.zipup.dev",
"appKey": "your_app_key",
"secretKey": "your_secret_key",
"buildFolder": ".",
"ignore": ["node_modules", ".git"]
}
What Zipup CLI Does
- Packages your build artifact
- Applies ignore rules
- Signs the artifact for integrity verification
- Uploads it to Zipup Cloud
- Performs a health check after deployment
Persistent Storage
You will want some data to persist across deployments.
Use the /data directory for persistent storage. This directory is persisted across deployments.
Environment Variables and Secrets
For Web Apps only:
- You can configure:
- Environment Variables
- Secrets
From the UI:
- Go to Web Apps
- Select your application
- Use:
- Env Variables tab
- Secrets tab
More about env variables and secrets covered in this section.