Installation
Add the AntelopeJS Cloud module to an AntelopeJS DMS project.
The module runs inside a project that loads @antelopejs/dms and a database module, such as @antelopejs/mongodb.
Requirements
The compatibility block of the README lists the @antelopejs/* ranges each release supports. The project needs:
- A DMS backend in a release that implements the
@antelopejs/interface-dmsrange of that block. - The
@antelopejs/dms-frontendrenderer in the range ofengines["@antelopejs/dms-frontend"]infrontend-vue/package.json. Theajs dmsCLI refuses to build the module with a renderer outside that range. - A git work tree for the project, with an
originremote on GitHub for AntelopeJS Cloud to build from.
Add the module from npm
Name the module in the modules of the project's antelope.config.ts:
modules: {
"antelope-cloud": {
source: {
type: "package",
package: "@antelopejs/dms-antelope-cloud",
version: "^0.1.0",
},
config: { secretKey: process.env.ANTELOPE_CLOUD_SECRET_KEY },
},
}
Use the version npm lists. A project that AntelopeJS Cloud builds needs this form. Its build installs the module like any other package, and the deployed instance, which has no secretKey, leaves it out, as Where the module runs explains.
Add the module from its repository
To run a version that npm does not have yet, name the repository instead:
modules: {
"antelope-cloud": {
source: {
type: "git",
remote: "https://github.com/AntelopeJS/dms-antelope-cloud.git",
branch: "main",
installCommand: ["pnpm install --frozen-lockfile", "pnpm build"],
},
config: { secretKey: process.env.ANTELOPE_CLOUD_SECRET_KEY },
},
}
The git form needs read access to the repository and git credentials on every machine that installs the project, and it builds the module at each install. A build on AntelopeJS Cloud has no credentials for the repository, so a project that uses the git form cannot build there.
Set the secret key
- Set
ANTELOPE_CLOUD_SECRET_KEYto a random string of at least 32 characters on the machine you publish from. - Leave the variable unset on every service AntelopeJS Cloud runs.
- Restart the backend, then the frontend.
- Open AntelopeJS Cloud under Modules in the sidebar.
While the DMS has no project, the module opens the first-run setup. In an AntelopeJS Cloud development environment, also pass the managed option, as the development environment page shows.