There is a command line tool, which helps you with developing Contember projects and running them.
Run it without any args to see a help
Which will print the available commands
Usage: <command> <command args>instance:create <instanceName> [--template <value>] - Creates a new Contember instanceinstance:down [instanceName] - Stops local Contember instanceinstance:info [instanceName] - Show status of local Contember instanceinstance:logs [instanceName] - Show Contember instance logsinstance:reload:admin [instanceName] - Reloads Contember admininstance:reload:api [instanceName] - Reloads Contember APIinstance:up [instanceName] [--host <value>] [--ports <value>] [--admin-runtime <value> ("docker" or "node")] - Starts Contember instanceinstance:validate-config [instanceName] - Validates configuration of Contember instancemigrations:diff <projectName> <migrationName> [--migrations-dir <value>] [--project-dir <value>] - Creates .json schema migration for given projectmigrations:dry-run <project> [migration] - Show SQL executed by a migrationproject:create <projectName> [--instance <value> [... --instance <value>]] [--all-instances] [--no-instance] [--template <value>] - Creates a new Contember projectproject:register <projectName> [--instance <value> [... --instance <value>]] [--all-instances] [--no-instance] - Registers a project to an instancetenant:create-api-key [instance (Local instance name or remote Contember API URL)] - Creates an API keytenant:setup <apiUrl (Contember API URL)> - Creates superadmin and login keytenant:sign-in [instance (Local instance name or remote Contember API URL)] - Signs in a userworkspace:create <workspaceName> [--with-admin] [--template <value>] - Creates a new Contember workspace
Identifying an instance
Some commands like
instance:up have a parameter instanceName. This parameter is optional when you have a single instance. In case of multiple instances, you have to specify it. You can also use a environment variable
CONTEMBER_INSTANCE to preselect an instance.
This command is a wrapper around docker-compose in your instance. Before actually running a docker-compose, it resolves some runtime configuration, e.g. it finds free ports, where all required services can be exposed.
When you are using Contember Admin on a Windows, you might find useful
--admin-runtime=nodeoption, which may significantly improve performance. Node >= 12 is required for this option.
You can stop running instance by sending a SIGINT (Ctrl+C) to
instance:up or by running this command.
Shows status of running instances. Also it prints all exposed services with their URL.
See migrations chapter.