Publishing & sharing your app
Publishing (also called "releasing" or "deploying") means that the application is uploaded to the VIKTOR platform, making the app available in the organization environment. Note that the source code is secure and cannot be inspected by users that have access to the online VIKTOR environment.
Free-tier VIKTOR developers (cloud.viktor.ai) can only publish editor-type apps
with a public visibility on the workspace.
Publish a new app
There are two ways to develop and publish apps on the VIKTOR platform:
- App Builder: A fully in-browser development experience with AI assistance. You can develop and publish apps directly from your browser without any local setup.
- Local development with CLI: The traditional approach using your local development environment and the VIKTOR CLI (described below).
To make an app available for others to use, you will need to follow these two steps:
- Publish the application source code
- Add the app to a project
It might be the case that your company doesn't allow users to create projects themselves. In this case you need to ask the environment administrator to create a project for you.
The following sections describe the local development publishing flow using the CLI. If you're using the App Builder, you can publish directly from the browser by clicking the Publish button.
1. Publish the application source code
Once your app is ready, the developer can publish the source code by using the
publish command of the CLI:
viktor-cli publish
You can also override the tag and app name of your new published version by running the CLI command such below:
viktor-cli publish --registered-name <insert-app-name-here> --tag v0.1.0
The registered-name is specified when the app is created by the developer and can be inspected using the
apps command of the CLI:
>>> viktor-cli apps
The following apps are connected to your account:
Name | Full name | Latest tag | SDK version | Status
crane-demo | crane-demo.viktor.demo | v2.1 | 13.6.2 | published
monitoring-demo | monitoring-demo.viktor.demo | v1.1 | 13.6.1 | published
...
Alternatively, find your app in the App store and navigate to the app details page.
- Although we use the term 'tag' as a variable for the publish command, this is not linked to the git tag. The CLI
will not check out the tag you specify in the publish command, you will have to do this manually first (e.g.
git checkout <TAG>). - If you are using git the CLI respects the .gitignore file and uses git to gather the files for uploading to VIKTOR.
- You can force the CLI to upload all files in the app folder by using the
--use-filesystemflag. - If you have any uncommitted changes or unstaged files, the
publishcommand will fail as a safety mechanism.