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
imagestringDocker image
pathstringPath to build from source
cwdstringWorking directory
commandstring[]Command to run
envRecord<string, string>Environment variables
mountsArray<{ source, target }>Volume mounts