Bridge what Dokploy v0.30 added, and let the docs through
Six new resources from terraform-provider-dokploy v0.2.0 -- Network, DnsProvider, VaultProvider, Schedule, VolumeBackup and Libsql -- plus the new properties on Domain (`enabled`), Compose (`serviceNetworks`, `createEnvFile`, `icon`) and Application. Verified with `pulumi up` against a live v0.30.2 instance: create, preview-clean, and destroy. The upstream provider also now refuses a volume Mount with no `volumeName`, which Dokploy would otherwise turn into an anonymous Docker volume recreated on every deploy. That surfaces here at preview time, before anything exists. Two things made that fix nearly invisible to Pulumi users, so this commit fixes the second one: the bridge resolves the upstream `docs/` through the Go module cache, where a locally `replace`d dependency never lands, so tfgen was emitting every resource with no description at all. UpstreamRepoPath now points at the checkout and all 445 inputs carry documentation -- with names rendered per language, so Python readers see `volume_name` where TypeScript readers see `volumeName`.
This commit is contained in:
@@ -106,7 +106,7 @@ an `_authToken` in `.npmrc`, `--extra-index-url` with basic auth for pip, and
|
||||
Before the first release, build and install it locally instead:
|
||||
|
||||
```bash
|
||||
make install VERSION=0.1.0
|
||||
make install VERSION=0.2.0
|
||||
```
|
||||
|
||||
That drops `pulumi-resource-dokploy` into the local plugin cache, so
|
||||
@@ -146,13 +146,42 @@ pulumi config set --secret dokploy:apiKey "$DOKPLOY_API_KEY"
|
||||
| ------------ | ------------------------------------------------------------------------- |
|
||||
| Structure | `Project`, `Environment` |
|
||||
| Services | `Application`, `Compose` |
|
||||
| Databases | `Postgres`, `MySql`, `MariaDb`, `Mongo`, `Redis` |
|
||||
| Networking | `Domain`, `Mount`, `Port`, `Redirect`, `Security` |
|
||||
| Databases | `Postgres`, `MySql`, `MariaDb`, `Mongo`, `Redis`, `Libsql` |
|
||||
| Networking | `Domain`, `Mount`, `Port`, `Redirect`, `Security`, `Network` |
|
||||
| Scheduling | `Schedule`, `VolumeBackup` |
|
||||
| Integrations | `DnsProvider`, `VaultProvider` |
|
||||
| Account | `Registry`, `SshKey`, `Certificate`, `Destination` |
|
||||
|
||||
Data sources: `getProject`, `getProjects`, `getEnvironment`, `getApplication`,
|
||||
`getServers`.
|
||||
|
||||
### Volumes that actually persist
|
||||
|
||||
A `Mount` with `type: "volume"` **must** set `volumeName`:
|
||||
|
||||
```typescript
|
||||
new dokploy.Mount("uploads", {
|
||||
type: "volume",
|
||||
volumeName: "shop-uploads", // required — see below
|
||||
mountPath: "/app/uploads",
|
||||
serviceType: "application",
|
||||
serviceId: api.id,
|
||||
});
|
||||
```
|
||||
|
||||
Dokploy turns a mount into a Docker mount with
|
||||
`{Source: volumeName || "", Target: mountPath}`. With no `volumeName` the
|
||||
source is the empty string, which Docker reads as an *anonymous* volume: a new
|
||||
one on every deploy, with the previous one orphaned on disk. Nothing errors —
|
||||
the service starts and the path is writable — but the data is gone again after
|
||||
the next deployment.
|
||||
|
||||
Dokploy's API accepts that mount, so this provider rejects it during
|
||||
`pulumi preview` instead, along with `type: "bind"` without `hostPath` and
|
||||
`type: "file"` without `filePath`.
|
||||
|
||||
Pair a named volume with `VolumeBackup` to get it off the host on a schedule.
|
||||
|
||||
## Deploying from CI
|
||||
|
||||
Like the Terraform provider, this one manages *configuration*, not *rollouts*.
|
||||
@@ -240,7 +269,7 @@ Gitea's Go registry, at which point the module resolves through `GOPROXY`:
|
||||
export GOPROXY=https://gitea.coolify.vojtkov.dev/api/packages/usr_unknown/go,direct
|
||||
export GONOSUMDB='github.com/maxvojtkov/*'
|
||||
cd provider && go mod edit -dropreplace github.com/maxvojtkov/terraform-provider-dokploy \
|
||||
&& go get github.com/maxvojtkov/terraform-provider-dokploy@v0.1.0
|
||||
&& go get github.com/maxvojtkov/terraform-provider-dokploy@v0.2.0
|
||||
```
|
||||
|
||||
The upstream provider exposes itself through its `shim` package
|
||||
@@ -252,7 +281,7 @@ from outside that module.
|
||||
Tag the repository and the `release` workflow does the rest:
|
||||
|
||||
```bash
|
||||
git tag v0.1.0 && git push origin v0.1.0
|
||||
git tag v0.2.0 && git push origin v0.2.0
|
||||
```
|
||||
|
||||
GoReleaser publishes the plugin binaries to a Gitea release first — Pulumi
|
||||
|
||||
Reference in New Issue
Block a user