Skip to content

Job

Run one-time tasks.

A job runs a command once and exits — migrations, seed scripts, builds.

import { job } from "vyft";
export const migrate = job("migrate", {
image: "node:22",
command: ["npx", "prisma", "migrate", "deploy"],
env: {
DATABASE_URL: "postgres://localhost:5432/app",
},
});
FieldTypeDefaultDescription
imagestring—Docker image
pathstring—Path to build from source
cwdstring—Working directory
commandstring[]—Command to run
envRecord<string, string>—Environment variables
mountsArray<{ source, target }>—Volume mounts