docs: update README to reflect changes from template.yml to template.toml

- Revised references in the README to replace 'template.yml' with 'template.toml'.
- Updated the structure section to provide details on the new TOML format for variables and configuration settings.
This commit is contained in:
Mauricio Siu
2025-03-30 01:39:44 -06:00
parent 3a1f5f7c88
commit 71ff264c19

View File

@@ -45,7 +45,7 @@ services:
volumes: volumes:
grafana-storage: {} grafana-storage: {}
``` ```
3. Add the `template.yml` file to the folder, this is where we specify the domains, mounts and env variables, to understand more the structure of `template.yml` you can read here [Template.yml structure](#templateyml-structure) 3. Add the `template.toml` file to the folder, this is where we specify the domains, mounts and env variables, to understand more the structure of `template.toml` you can read here [Template.toml structure](#template.toml-structure)
```yaml ```yaml
variables: variables:
@@ -82,48 +82,50 @@ config:
6. Commit and push your changes 6. Commit and push your changes
7. Create a pull request 7. Create a pull request
### Template.yml structure ### Template.toml structure
Dokploy use a defined structure for the `template.yml` file, we have 4 sections available:
Dokploy use a defined structure for the `template.toml` file, we have 4 sections available:
1. `variables`: This is where we define the variables that will be used in the `domains`, `env` and `mounts` sections. 1. `variables`: This is where we define the variables that will be used in the `domains`, `env` and `mounts` sections.
2. `domains`: This is where we define the configuration for the template. 2. `domains`: This is where we define the configuration for the template.
3. `env`: This is where we define the environment variables for the template. 3. `env`: This is where we define the environment variables for the template.
4. `mounts`: This is where we define the mounts for the template. 4. `mounts`: This is where we define the mounts for the template.
- The `variables(Optional)` structure is the following: - The `variables(Optional)` structure is the following:
```yaml ```toml
variables: [variables]
main_domain: ${domain} main_domain = "${domain}"
my_domain: https://my-domain.com my_domain = "https://my-domain.com"
my_password: ${password:32} my_password = "${password:32}"
any_helper: ${you-can-use-any-helper} any_helper = "${you-can-use-any-helper}"
``` ```
- The `config` structure is the following: - The `config` structure is the following:
```yaml ```toml
config: [config]
domains: # Optional # Optional sections below
- serviceName: grafana # Required
port: 3000 # Required
host: ${main_domain} # Required
path: / # Optional
env: # Optional [[config.domains]]
- AP_HOST=${main_domain} serviceName = "grafana" # Required
- AP_API_KEY=${api_key} port = 3000 # Required
- AP_ENCRYPTION_KEY=${encryption_key} host = "${main_domain}" # Required
- AP_JWT_SECRET=${jwt_secret} path = "/" # Optional
- AP_POSTGRES_PASSWORD=${postgres_password}
mounts: # Optional or [] env = [
- filePath: /content/file.txt "AP_HOST=${main_domain}",
content: | "AP_API_KEY=${api_key}",
My content "AP_ENCRYPTION_KEY=${encryption_key}",
"AP_JWT_SECRET=${jwt_secret}",
"AP_POSTGRES_PASSWORD=${postgres_password}"
]
[[config.mounts]]
filePath = "/content/file.txt"
content = """
My content
"""
``` ```
Important: you can reference any variable in the `domains`, `env` and `mounts` sections. just use the `${variable_name}` syntax, in the case you don't want to define a variable, you can use the `domain`, `base64`, `password`, `hash`, `uuid`, `randomPort` or `timestamp` helpers. Important: you can reference any variable in the `domains`, `env` and `mounts` sections. just use the `${variable_name}` syntax, in the case you don't want to define a variable, you can use the `domain`, `base64`, `password`, `hash`, `uuid`, `randomPort` or `timestamp` helpers.