mirror of
https://github.com/Dokploy/templates
synced 2025-06-26 18:16:07 +00:00
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:
parent
3a1f5f7c88
commit
71ff264c19
58
README.md
58
README.md
@ -45,7 +45,7 @@ services:
|
||||
volumes:
|
||||
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
|
||||
variables:
|
||||
@ -82,48 +82,50 @@ config:
|
||||
6. Commit and push your changes
|
||||
7. Create a pull request
|
||||
|
||||
### Template.yml structure
|
||||
|
||||
Dokploy use a defined structure for the `template.yml` file, we have 4 sections available:
|
||||
### Template.toml structure
|
||||
|
||||
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.
|
||||
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.
|
||||
4. `mounts`: This is where we define the mounts for the template.
|
||||
|
||||
|
||||
- The `variables(Optional)` structure is the following:
|
||||
|
||||
```yaml
|
||||
variables:
|
||||
main_domain: ${domain}
|
||||
my_domain: https://my-domain.com
|
||||
my_password: ${password:32}
|
||||
any_helper: ${you-can-use-any-helper}
|
||||
```toml
|
||||
[variables]
|
||||
main_domain = "${domain}"
|
||||
my_domain = "https://my-domain.com"
|
||||
my_password = "${password:32}"
|
||||
any_helper = "${you-can-use-any-helper}"
|
||||
```
|
||||
|
||||
- The `config` structure is the following:
|
||||
|
||||
```yaml
|
||||
config:
|
||||
domains: # Optional
|
||||
- serviceName: grafana # Required
|
||||
port: 3000 # Required
|
||||
host: ${main_domain} # Required
|
||||
path: / # Optional
|
||||
```toml
|
||||
[config]
|
||||
# Optional sections below
|
||||
|
||||
env: # Optional
|
||||
- AP_HOST=${main_domain}
|
||||
- AP_API_KEY=${api_key}
|
||||
- AP_ENCRYPTION_KEY=${encryption_key}
|
||||
- AP_JWT_SECRET=${jwt_secret}
|
||||
- AP_POSTGRES_PASSWORD=${postgres_password}
|
||||
[[config.domains]]
|
||||
serviceName = "grafana" # Required
|
||||
port = 3000 # Required
|
||||
host = "${main_domain}" # Required
|
||||
path = "/" # Optional
|
||||
|
||||
mounts: # Optional or []
|
||||
- filePath: /content/file.txt
|
||||
content: |
|
||||
My content
|
||||
env = [
|
||||
"AP_HOST=${main_domain}",
|
||||
"AP_API_KEY=${api_key}",
|
||||
"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.
|
||||
|
Loading…
Reference in New Issue
Block a user