You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
-3Lines changed: 0 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,6 @@
2
2
3
3
This repository contains the official documentation for the DeployStack ecosystem. Visit [deploystack.io](https://deploystack.io) to learn more about our platform.
Copy file name to clipboardExpand all lines: docs/deploystack/deploystack-config-file.md
+130-3Lines changed: 130 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,9 +43,11 @@ You can override these values using the `config.yml` (only on your main branch)
43
43
44
44
| Property | Type | Description | Constraints |
45
45
|----------|------|-------------|-------------|
46
-
| `name` | String | Override the repository name for DeployStack display | Maximum 40 characters |
47
-
| `description` | String | Override the repository description for DeployStack display | Maximum 500 characters |
48
-
| `logo` | String | URL to your application logo | [Application Logo Configuration](/docs/deploystack/application-logo-configuration.md) |
46
+
| `mappings` | Array | Defines relationships between services for connection configuration | Required |
47
+
| `mappings[].fromService` | String | Service that needs to connect to another service | Required |
48
+
| `mappings[].toService` | String | Service being connected to | Required |
49
+
| `mappings[].environmentVariables` | Array of Strings | Environment variable names that reference the target service | Required |
50
+
| `mappings[].property` | String | Type of connection property to reference (e.g., 'connectionString', 'hostport') | Optional, defaults to 'hostport' |
49
51
50
52
The override process follows this order:
51
53
@@ -64,6 +66,7 @@ You can configure multiple branch deployments using the `deployment.branches` se
64
66
| `description` | String | Explain the branch's purpose or version | Maximum 100 characters |
65
67
| `active` | Boolean | Whether this branch is available for deployment | Optional, defaults to true |
66
68
| `priority` | Number | Order in which branches appear (lower numbers first) | Minimum value: 1 |
69
+
| `exclude_providers` | Array | Optional list of cloud providers to exclude from template generation for this branch | Values must be valid provider codes: "aws", "rnd", "dop" |
67
70
68
71
The default branch always has `priority: 0` and appears first in the deployment options, regardless of other branch priorities.
69
72
@@ -80,6 +83,8 @@ deployment:
80
83
label: "Beta (v2.x)"
81
84
description: "Preview of upcoming v2.x release"
82
85
priority: 1
86
+
exclude_providers:
87
+
- "aws" # Exclude AWS CloudFormation for this branch
83
88
v3:
84
89
label: "Alpha (v3.x)"
85
90
description: "Early preview of v3.x"
@@ -102,6 +107,93 @@ When multiple branches are configured:
102
107
103
108
This is especially useful for projects that maintain multiple active versions simultaneously, such as stable and beta releases.
104
109
110
+
The optional `exclude_providers` array allows you to specify which cloud providers should be excluded from template generation for particular branches. This is useful when certain features in a branch version may not be compatible with specific cloud providers. Valid provider codes are:
111
+
112
+
Please check our [current supported provider list here](/docs/docker-to-iac/parser/index.md).
113
+
114
+
For example, if your beta version uses features only supported in DigitalOcean, you might exclude the other providers:
115
+
116
+
```yaml
117
+
v2-beta:
118
+
label: "Beta"
119
+
description: "Beta version with DigitalOcean-specific features"
120
+
exclude_providers:
121
+
- "aws"
122
+
- "rnd"
123
+
```
124
+
125
+
If no providers are excluded, templates will be generated for all supported cloud providers.
126
+
127
+
### Service Connections
128
+
129
+
You can configure service-to-service communication for multi-container applications using the `serviceConnections` property within each branch configuration. This feature is particularly useful for applications where services need to communicate with each other (e.g., web apps connecting to databases).
130
+
131
+
| Property | Type | Description | Constraints |
132
+
|----------|------|-------------|-------------|
133
+
| `mappings` | Array | Defines relationships between services for connection configuration | Required |
134
+
| `mappings[].fromService` | String | Service that needs to connect to another service | Required |
135
+
| `mappings[].toService` | String | Service being connected to | Required |
136
+
| `mappings[].environmentVariables` | Array of Strings | Environment variable names that reference the target service | Required |
137
+
138
+
Example configuration for service connections:
139
+
140
+
```yaml
141
+
deployment:
142
+
branches:
143
+
main:
144
+
label: "Production"
145
+
description: "Production release"
146
+
serviceConnections:
147
+
mappings:
148
+
- fromService: "app"
149
+
toService: "db"
150
+
environmentVariables:
151
+
- "DATABASE_HOST"
152
+
- "DATABASE_URL"
153
+
property: "connectionString"
154
+
- fromService: "frontend"
155
+
toService: "api"
156
+
environmentVariables:
157
+
- "API_URL"
158
+
property: "hostport"
159
+
```
160
+
161
+
This configuration tells DeployStack how to properly configure communication between:
162
+
163
+
- The "app" service and the "db" service through the DATABASE_HOST and DATABASE_URL environment variables
164
+
- The "frontend" service and the "api" service through the API_URL environment variable
165
+
166
+
When templates are generated, DeployStack will transform these environment variables according to each cloud provider's specific service discovery mechanism:
167
+
168
+
- For Render.com: Uses Blueprint's `fromService` syntax
169
+
- For DigitalOcean App Platform: Uses direct service name references
170
+
171
+
For example, if your docker-compose.yml contains:
172
+
173
+
```yaml
174
+
services:
175
+
app:
176
+
image: node:alpine
177
+
environment:
178
+
DATABASE_HOST: db
179
+
db:
180
+
image: mariadb:latest
181
+
```
182
+
183
+
The generated Render.com template would transform DATABASE_HOST to use their service discovery syntax:
184
+
185
+
```yaml
186
+
services:
187
+
- name: app
188
+
# ...other configuration...
189
+
envVars:
190
+
- key: DATABASE_HOST
191
+
fromService:
192
+
name: db
193
+
type: pserv
194
+
property: hostport
195
+
```
196
+
105
197
## Schema Validation
106
198
107
199
The configuration file is automatically validated against our JSON Schema when using supported IDEs (VS Code, IntelliJ, etc.). The schema is available at:
- DigitalOcean App Platform (DOP): Uses direct service names
438
+
439
+
Example:
440
+
441
+
```javascript
442
+
serviceConnections: {
443
+
mappings: [
444
+
{
445
+
fromService:'frontend',
446
+
toService:'api',
447
+
environmentVariables: ['API_URL'],
448
+
property:'hostport'
449
+
},
450
+
{
451
+
fromService:'app',
452
+
toService:'db',
453
+
environmentVariables: ['DATABASE_URL'],
454
+
property:'connectionString'
455
+
}
456
+
]
457
+
}
458
+
```
377
459
378
460
### Return Value
379
461
380
-
Returns the translated Infrastructure as Code template in the specified format. The structure and content will vary based on the target IaC language and template format chosen.
462
+
Returns the translated Infrastructure as Code template and any resolved service connections:
463
+
464
+
```typescript
465
+
{
466
+
files: {
467
+
// Generated IaC template files with paths as keys
Copy file name to clipboardExpand all lines: docs/docker-to-iac/publishing-to-npm.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ menuTitle: Publishing to NPM
5
5
6
6
# Publishing docker-to-iac module to NPM
7
7
8
-
We have created an organization @deploystack for NPM. Publishing in NPM happens automatically through `semantic-release`. Config: [https://github.com/deploystackio/docker-to-iac/blob/main/.github/workflows/release.yml](https://github.com/deploystackio/docker-to-iac/blob/main/.github/workflows/release.yml)
8
+
We have created an organization @deploystack for NPM. Publishing in NPM happens automatically through `semantic-release`. Config: [https://github.com/deploystackio/docker-to-iac/blob/main/.github/workflows/release-pr.yml](https://github.com/deploystackio/docker-to-iac/blob/main/.github/workflows/release-pr.yml)
9
9
10
10
The prerequisite for a release is a successful pull request to the default branch `main`. This means that all tests must first be successfully completed. `semantic-release` creates a new version and automatically publishes the node package to: [https://www.npmjs.com/package/@deploystack/docker-to-iac](https://www.npmjs.com/package/@deploystack/docker-to-iac)
0 commit comments