Guides

Run an app made of several parts

Some projects are more than one program: a website, a worker, a search engine. 1ClickOps can run all the parts together as one app with one address, and it says plainly what it will not run.

When 1ClickOps offers it

When you choose a repository in Deploy New Application, a panel called What this app needs reads the repository’s files. If the project is several programs that belong together, such as a website and a worker that does jobs in the background, the panel lists them. You choose Run all its parts together (marked Recommended) or Only run my code.

Run together, every part is built from your repository and runs on your server, and every push updates them together. Visitors reach the one part the panel names. The other parts can be reached only from inside the app.

The usual file is not run as written

Most of these files describe only your app and its databases. 1ClickOps does not run those databases as written: your code runs as the app, and each database becomes one that 1ClickOps manages. A managed database is backed up every day, restorable, and copied for staging. See Databases.

What is refused, and why

The file is checked before anything starts, and the agent on your server checks it again. A part is refused when it could reach beyond the app.

  • Images and folders of your repository only. A part is a published image or is built from a folder inside your repository. Building from anywhere else is refused.
  • Files live in named volumes only. A folder on your server cannot be mounted, because that would open up everything else on it.
  • No values filled in from the server, written as a dollar sign followed by braces. They would come from the server’s own settings instead of yours. Put the setting under Settings.
  • Up to 10 parts, and nothing may ask for privileged or host access.

If the file is refused, the panel says why in a sentence and your code will be deployed as one app instead.

If you already have a file

In Developer mode, the Ready-made apps page has a card called Run a compose file. Press Paste a file, paste it, choose the Service visitors reach, give Its port inside the container, and press Run it. A pasted file has no repository to build from, so it can use images only (name:tag). The same refusals apply.

Something unclear or wrong on this page? Email support@1clickops.com.