Creating and Publishing a Doover Application
Pre-requisites
You should install the doover-cli
tool to create and manage Doover applications. You can install it with:
uv tool install doover-cli
If you don't have UV installed, see the UV documentation.
You should also have the following handy:
- Organisation Key. You can find this in the Doover management portal under "Organisation Settings". If you're stuck, ask your Doover representative.
- Container Repository Profile Key. You can find this in the Doover management portal under "Container Repository Profile". If you're stuck, ask your Doover representative.
Creating a New Application
To create a new Doover application, run the following command:
doover app create
This will walk you through a series of prompts to configure your application.
An example of the prompts is shown below:
>>> doover app create ? What is the name of your app? Pump Controller ? Description (tell me a little about your app - what does it do?) Turns pumps on and off according to a schedule, and with a button press ? Would you like me to initiate a git repository? Yes ? What is the container registry for your app? ghcr.io/getdoover ? What is the owner organisation's key (on Doover)? (leave blank if you don't know) abcdefg-1234-5678-abcd-abcd1234efgh ? What is the container registry profile key on Doover? (leave blank if you don't know) abcdefg-1234-5678-abcd-abcd1234efgh Fetching template repository... Renaming template files... Updating config... Initialized empty Git repository in /Users/josh/Coding/doover/pump-controller/.git/ You can now push your app to GitHub or another git provider. If using GitHub, try gh repo create to create the repo in the CLI. If you want to push your app to a different git provider, or create the repository manually at github.com, you can add the repository like so: git remote add origin <url> git push -u origin main Done! You can now build your application with doover app build, run it with doover app run, or deploy it with doover app deploy.
Creating a Git Repository
If you chose to create a git repository during the application creation process, you can now create your repository on Github or another provider.
Make sure to not select "Add a README file" or "Add a .gitignore file" when creating the repository, as these files are already included in your Doover application.
If you are using GitHub, you can use the gh
CLI to create the repository:
gh repo create <your-github-username>/<your-app-name>
or the GUI as shown below:
Pushing to Git
Once you have created the repository, you can push your application to it. Run the following commands in your terminal:
# add the remote repository git remote add origin git@github.com:<org>/<repo>.git # push the application to the remote repository git push
Publishing: Option 1 (Preferred)
The first (and recommended) approach is to use the provided Github Actions workflow to automatically build and publish your application to Docker when you push to the main
branch.
However, in the interim, you will still need to manually publish your application metadata (name, config schema, visibility, etc.) to Doover with the CLI.
Assuming you've correctly setup your CLI profile with doover login
, you can publish your application by running the following command from the app directory:
# in pump-controller/ doover app publish --skip-container
This will:
- Export your app config schema to
doover_config.json
- Publish your app metadata to Doover
- Skip any container building since we leave that to the GitHub Actions workflow
All things being well, you should see the application in the Doover marketplace on a page refresh.
Publishing: Option 2
If you don't want to use the GitHub Actions workflow, you can build and publish your application manually.
Firstly, make sure you have logged into the appropriate container registry with the docker login
command.
For instructions on how to do this for the Github container registry, see the Github documentation.
Then, you can build and publish your application with the following command:
# in pump-controller/ doover app publish
This will:
- Export your app config schema to
doover_config.json
- Publish your app metadata to Doover
- Build your application container
- Push the container to the configured container registry
All things being well, you should see the application in the Doover marketplace on a page refresh, and the built image in your respective container registry.
Updating an Application (Re-Publishing)
Simply follow the same steps as above to update your application. There's no special tricks the second time around!
Next Steps
You can now deploy your application to a device. See the Deploying an Application guide for more information on how to do this.