mirror of
https://github.com/moghtech/komodo.git
synced 2026-05-23 06:38:40 -05:00
add docker compose docs
This commit is contained in:
@@ -1,15 +1,20 @@
|
||||
# Docker Compose
|
||||
|
||||
Monitor supports docker compose through the `Stack` resource. Just create a new Stack, with any name, to get started.
|
||||
Monitor supports docker compose through the `Stack` resource.
|
||||
|
||||
## Define the file/s
|
||||
While Monitor supports pasting in / managing the compose file in UI, the best way to deploy Stacks is using compose files located in a git repo.
|
||||
## Define the compose file/s
|
||||
|
||||
Monitor supports 3 ways of defining the compose files:
|
||||
1. **Write them in the UI**, and Monitor will write them to your host at deploy-time.
|
||||
2. **Store them in a git repo**, and have Monitor clone it on the host to deploy.
|
||||
3. **Store the files anywhere on the host**, and Monitor will just run the compose commands on the existing files.
|
||||
|
||||
The recommended way to deploy Stacks is using compose files located in a git repo.
|
||||
|
||||
If you manage your compose files in git repos:
|
||||
|
||||
- All your files, across all servers, are available locally to edit in your favorite text editor.
|
||||
- All of your changes are tracked, and can be reverted.
|
||||
- You can layer multiple compose files for greater composability, just like using `docker compose -f service_1.yaml -f service_2.yaml ...`
|
||||
- You can use the git webhooks to do other automations when you change the compose file contents. Redeploying will be as easy as just `git push`.
|
||||
|
||||
:::info
|
||||
@@ -17,7 +22,27 @@ Many Monitor resources need access to git repos. There is an in-built token mana
|
||||
All resources which depend on git repos are able to use these credentials to access private repos.
|
||||
:::
|
||||
|
||||
## Define the Environment
|
||||
## Importing Existing Compose projects
|
||||
|
||||
First create the Stack in Monitor, and ensure it has access to the compose files using one
|
||||
of the three methods above. Make sure to attach the server you wish to deploy on.
|
||||
|
||||
## Deploy Stacks
|
||||
In order for Monitor to pick up a running project, it has to know the compose "project name".
|
||||
You can find the project name by running `docker compose ls` on the host.
|
||||
|
||||
By default, Monitor will assume the Stack name is the compose project name.
|
||||
If this is different than the project name on the host, you can configure a custom "Project Name" in the config.
|
||||
|
||||
## Pass Environment Variables
|
||||
|
||||
Monitor is able to pass custom environment variables to the docker compose process.
|
||||
This works by:
|
||||
|
||||
1. Write the variables to a ".env" file on the host at deploy-time.
|
||||
2. Pass the file to docker compose using the `--env-file` flag.
|
||||
|
||||
:::info
|
||||
Just like all other resources with Environments (Deployments, Repos, Builds),
|
||||
Stack Environments support **Variable and Secret interpolation**. Define global variables
|
||||
in the UI and share the values across environments.
|
||||
:::
|
||||
@@ -44,6 +44,7 @@ const sidebars: SidebarsConfig = {
|
||||
// "deploy-containers/versioning",
|
||||
],
|
||||
},
|
||||
"docker-compose",
|
||||
"sync-resources",
|
||||
"webhooks",
|
||||
"permissioning",
|
||||
|
||||
Reference in New Issue
Block a user