Skip to content

Application Management

The doover app command group provides tools for the complete application development lifecycle, from scaffolding new projects to deploying them to the Doover platform.

Available Commands

CommandDescription
createCreate a new application from template
buildBuild the application Docker image
runRun the application locally with simulators
testRun tests using pytest
lintRun linter (ruff) on the application
formatRun formatter (ruff) on the application
publishDeploy the application to Doover
channelsOpen the channel viewer in your browser

Creating an Application

The doover app create command scaffolds a new Doover application using an interactive wizard.

Usage

doover app create

Interactive Prompts

PromptDescription
App nameName of your application (alphanumeric, dashes, underscores)
DescriptionBrief description of what the app does
Initialize gitWhether to create a git repository
Container registryWhere to push Docker images
Owner org keyYour organization's key on Doover
Container profile keyContainer registry profile key on Doover

Container Registry Options

  • ghcr.io/getdoover - GitHub Container Registry (Doover internal)
  • ghcr.io/other - GitHub Container Registry (custom organization)
  • DockerHub (spaneng) - DockerHub spaneng repository
  • DockerHub (other) - DockerHub custom repository

Example

$ doover app create
What is the name of your app? my-sensor-app
Description: Monitors temperature sensors and sends alerts
Would you like me to initiate a git repository? [Y/n] y
What is the container registry for your app? ghcr.io/getdoover
What is the owner organisation's key (on Doover)? my-org
What is the container registry profile key on Doover? my-registry

Fetching template repository...
Renaming template files...
Updating config...

Done! You can now build your application with doover app build, run it with doover app run, or deploy it with doover app deploy.

What Gets Created

The command creates a directory structure:

my-sensor-app/
├── src/
│   └── my_sensor_app/
│       ├── __init__.py
│       ├── app_config.py
│       └── ...
├── simulators/
│   └── docker-compose.yml
├── tests/
├── doover_config.json
├── pyproject.toml
└── README.md

Building an Application

The doover app build command builds a Docker image for your application.

Usage

doover app build [APP_PATH] [OPTIONS]

Options

OptionDescriptionDefault
APP_PATHPath to the application directoryCurrent directory
--buildx/--no-buildxUse docker buildx for multi-platform builds--buildx

Additional arguments are passed directly to docker build.

Example

# Build in current directory
doover app build

# Build with specific path
doover app build ./my-sensor-app

# Build without buildx
doover app build --no-buildx

# Pass additional docker build arguments
doover app build -- --no-cache --platform linux/arm64

The image name is read from the doover_config.json file's image_name field.

Running Locally

The doover app run command runs your application locally using Docker Compose with simulators.

Usage

doover app run [REMOTE] [OPTIONS]

Arguments and Options

Argument/OptionDescriptionDefault
REMOTERemote host to run on (optional)Local execution
--portPort for remote Docker connection2375

Additional arguments are passed to docker compose up.

Example

# Run locally
doover app run

# Run with abort on container exit
doover app run -- --abort-on-container-exit

# Run on a remote device
doover app run doovit-abc123.local

# Run on remote device with custom port
doover app run 192.168.1.100 --port 2375

Requirements

Your application must have a simulators/docker-compose.yml file that defines the local development environment.

Remote Execution

When running on a remote device:

  1. The CLI attempts to connect to the Docker daemon on the remote host
  2. If connection is refused, you can optionally disable the firewall
  3. SSH credentials may be requested for firewall management
  4. The DOCKER_HOST environment variable is set automatically

Testing

The doover app test command runs pytest on your application.

Usage

doover app test [APP_PATH] [PYTEST_ARGS]

Example

# Run all tests
doover app test

# Run tests in specific directory
doover app test ./my-sensor-app

# Pass pytest arguments
doover app test -- -v --tb=short

# Run specific test file
doover app test -- tests/test_sensors.py

Linting

The doover app lint command runs the ruff linter on your application code.

Usage

doover app lint [APP_PATH] [OPTIONS]

Options

OptionDescriptionDefault
--fixAutomatically fix linting issuesFalse

Example

# Check for linting issues
doover app lint

# Automatically fix issues
doover app lint --fix

# Lint specific directory
doover app lint ./my-sensor-app

Formatting

The doover app format command runs the ruff formatter on your application code.

Usage

doover app format [APP_PATH] [OPTIONS]

Options

OptionDescriptionDefault
--fixApply formatting changesFalse

Example

# Check formatting (no changes)
doover app format

# Apply formatting changes
doover app format --fix

Publishing

The doover app publish command deploys your application to the Doover platform and pushes the Docker image to the container registry.

Usage

doover app publish [APP_PATH] [OPTIONS]

Options

OptionDescriptionDefault
APP_PATHPath to the application directoryCurrent directory
--skip-containerSkip building and pushing the container imageFalse
--stagingForce staging modeAuto-detect
--export-config/--no-export-configExport app configuration before publishingTrue
--buildx/--no-buildxUse docker buildx for buildsTrue
--profileConfiguration profile to usedefault

Example

# Full publish (build, push, update platform)
doover app publish

# Skip container build (only update platform)
doover app publish --skip-container

# Publish to staging environment
doover app publish --staging

# Publish with specific profile
doover app publish --profile production

What Happens During Publish

  1. Export configuration - Runs doover config-schema export to update doover_config.json
  2. Validate configuration - Validates the config schema
  3. Update platform - Creates or updates the application on Doover
  4. Build image - Builds the Docker image with configured build args
  5. Push image - Pushes the image to the container registry

Staging vs Production

The CLI automatically detects staging mode based on the API URL:

  • URLs containing .d.doover are treated as staging
  • Use --staging to force staging mode

Staging deployments use a separate staging_config.key in the configuration.

Channel Viewer

The doover app channels command opens the Doover channel viewer in your web browser.

Usage

doover app channels [OPTIONS]

Options

OptionDescriptionDefault
--hostLocal host addresslocalhost
--portLocal port number49100

Example

# Open channel viewer with defaults
doover app channels

# Use custom host and port
doover app channels --host 192.168.1.100 --port 8080

This opens https://my.doover.com/channels/dda with your local URL as a query parameter, allowing you to view channels from your locally running application.

Configuration File

Applications use a doover_config.json file for configuration. Key fields include:

{
  "my_app": {
    "name": "my_app",
    "display_name": "My Application",
    "description": "Application description",
    "type": "DEV",
    "image_name": "ghcr.io/getdoover/my-app:main",
    "owner_org_key": "my-org",
    "container_registry_profile_key": "my-registry",
    "config_schema": { ... },
    "key": "app-key-from-doover",
    "staging_config": {
      "key": "staging-app-key"
    }
  }
}

Workflow Example

A typical development workflow:

# 1. Create a new application
doover app create

# 2. Navigate to the app directory
cd my-sensor-app

# 3. Make your code changes
# ...

# 4. Run linting and formatting
doover app lint --fix
doover app format --fix

# 5. Run tests
doover app test

# 6. Build and run locally
doover app build
doover app run

# 7. View channels in browser
doover app channels

# 8. Deploy to staging
doover app publish --staging

# 9. Deploy to production
doover app publish --profile production