Skip to content

recipes/adonisjs_local

View source on GitHub

typescript
import '@catapultjs/deploy/recipes/adonisjs_local'

This recipe keeps the usual AdonisJS shared paths and ace:* tasks, but switches the deployment flow to a local build plus artifact upload. Use recipes/adonisjs if you prefer the standard remote-build workflow.

Tasks

TaskInsertedDescription
deploy:buildbefore deploy:lockRuns node ace build on the local machine and prepares the build/ artifact
deploy:update_codeOverrides the built-in task and uploads the local build output to releases/<release> via SCP
deploy:installafter deploy:sharedInstalls production dependencies in the release with pmInstallProd()
ace:migration:runbefore deploy:publishRuns node ace migration:run --force
ace:migration:rollbackmanualRuns node ace migration:rollback
ace:migration:statusmanualRuns node ace migration:status
ace:list:routesmanualRuns node ace list:routes

Configuration

KeyTypeDefaultDescription
writable_dirsstring[]['storage', 'logs', 'tmp']Directories created in shared/ during cata deploy:setup
shared_dirsstring[]['storage', 'logs']Directories symlinked from shared/ into each release
shared_filesstring[]['.env']Files symlinked from shared/ into each release
adonisjs_pathstring''Sub-path to the AdonisJS app within the repository
source_pathstring<adonisjs_path>/build/.Local build directory uploaded to the release; ./build is normalized to ./build/.
typescript
import { set } from '@catapultjs/deploy'
import '@catapultjs/deploy/recipes/adonisjs_local'

set('source_path', './build')

The recipe copies package.json, the detected lock file, and, when present, pnpm-workspace.yaml, .npmrc, and ecosystem.config.cjs into the local build/ directory before uploading it. When source_path targets a directory, the recipe automatically uploads its contents, even if you omit the trailing /..