Resolve the plugin and SDKs from Gitea
PluginDownloadURL moves off github:// to a templated Gitea release URL.
Pulumi interpolates ${VERSION}, then appends
pulumi-resource-dokploy-v<version>-<os>-<arch>.tar.gz -- which is what
the GoReleaser archive template already produces. Schema, bridge
metadata and all four SDKs regenerated to carry it.
Releases publish to this instance's npm, PyPI, NuGet and Go registries
using the GITEA_TOKEN that Gitea injects, so no secrets need
configuring.
The Go SDK keeps its github.com module path, which is exactly why it
goes to Gitea's Go registry: pointing GOPROXY there is what makes that
path resolve at all. Verified locally by serving the module zip from a
file proxy and building a consumer against it -- note zip -D, without
which go get rejects the archive's directory entries.
This commit is contained in:
@@ -4,7 +4,6 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
env:
|
env:
|
||||||
@@ -12,9 +11,9 @@ env:
|
|||||||
NODE_VERSION: "20.x"
|
NODE_VERSION: "20.x"
|
||||||
PYTHON_VERSION: "3.11"
|
PYTHON_VERSION: "3.11"
|
||||||
DOTNET_VERSION: "8.0.x"
|
DOTNET_VERSION: "8.0.x"
|
||||||
# The provider's go.mod carries a local `replace` for the upstream Terraform
|
# provider/go.mod carries a local `replace` for the upstream Terraform
|
||||||
# provider, so it has to sit next to this checkout under this exact name.
|
# provider, so it has to sit next to this checkout under this exact name.
|
||||||
UPSTREAM_REPO: maxvojtkov/terraform-provider-dokploy
|
UPSTREAM_REPO: usr_unknown/terraform-provider-dokploy
|
||||||
UPSTREAM_DIR: dokploy-teraform
|
UPSTREAM_DIR: dokploy-teraform
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -31,6 +30,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
repository: ${{ env.UPSTREAM_REPO }}
|
repository: ${{ env.UPSTREAM_REPO }}
|
||||||
path: ${{ env.UPSTREAM_DIR }}
|
path: ${{ env.UPSTREAM_DIR }}
|
||||||
|
token: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
@@ -61,6 +61,9 @@ jobs:
|
|||||||
working-directory: pulumi-dokploy
|
working-directory: pulumi-dokploy
|
||||||
run: make provider
|
run: make provider
|
||||||
|
|
||||||
|
# schema.json and bridge-metadata.json are checked in and carry no
|
||||||
|
# version, so they only change when the mapping does. A diff here means
|
||||||
|
# someone edited resources.go without re-running `make tfgen`.
|
||||||
- name: Fail if the checked-in schema is stale
|
- name: Fail if the checked-in schema is stale
|
||||||
working-directory: pulumi-dokploy
|
working-directory: pulumi-dokploy
|
||||||
run: git diff --exit-code -- provider/cmd/pulumi-resource-dokploy/schema.json
|
run: git diff --exit-code -- provider/cmd/pulumi-resource-dokploy/schema.json
|
||||||
143
.gitea/workflows/release.yml
Normal file
143
.gitea/workflows/release.yml
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
name: release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags: ["v*.*.*"]
|
||||||
|
|
||||||
|
env:
|
||||||
|
GO_VERSION: "1.25.x"
|
||||||
|
NODE_VERSION: "20.x"
|
||||||
|
PYTHON_VERSION: "3.11"
|
||||||
|
DOTNET_VERSION: "8.0.x"
|
||||||
|
UPSTREAM_REPO: usr_unknown/terraform-provider-dokploy
|
||||||
|
UPSTREAM_DIR: dokploy-teraform
|
||||||
|
# Everything below authenticates with the token Gitea injects into every
|
||||||
|
# run, so releasing needs no configured secrets at all.
|
||||||
|
GITEA_HOST: gitea.coolify.vojtkov.dev
|
||||||
|
GITEA_OWNER: usr_unknown
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# The plugin binaries. Pulumi resolves them from this release via the
|
||||||
|
# PluginDownloadURL baked into the schema, so this has to land before anyone
|
||||||
|
# installs an SDK.
|
||||||
|
plugin:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
path: pulumi-dokploy
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: ${{ env.UPSTREAM_REPO }}
|
||||||
|
path: ${{ env.UPSTREAM_DIR }}
|
||||||
|
token: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: ${{ env.GO_VERSION }}
|
||||||
|
|
||||||
|
- uses: goreleaser/goreleaser-action@v6
|
||||||
|
with:
|
||||||
|
version: latest
|
||||||
|
args: release --clean
|
||||||
|
workdir: pulumi-dokploy
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
|
||||||
|
sdks:
|
||||||
|
needs: plugin
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
path: pulumi-dokploy
|
||||||
|
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: ${{ env.UPSTREAM_REPO }}
|
||||||
|
path: ${{ env.UPSTREAM_DIR }}
|
||||||
|
token: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: ${{ env.GO_VERSION }}
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: ${{ env.NODE_VERSION }}
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
|
|
||||||
|
- uses: actions/setup-dotnet@v4
|
||||||
|
with:
|
||||||
|
dotnet-version: ${{ env.DOTNET_VERSION }}
|
||||||
|
|
||||||
|
- name: Derive version from tag
|
||||||
|
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
- name: Build SDKs
|
||||||
|
working-directory: pulumi-dokploy
|
||||||
|
run: make build_sdks VERSION=${{ env.VERSION }}
|
||||||
|
|
||||||
|
- name: Publish to the Gitea npm registry
|
||||||
|
working-directory: pulumi-dokploy/sdk/nodejs/bin
|
||||||
|
env:
|
||||||
|
TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
run: |
|
||||||
|
cat > .npmrc <<EOF
|
||||||
|
@maxvojtkov:registry=https://${GITEA_HOST}/api/packages/${GITEA_OWNER}/npm/
|
||||||
|
//${GITEA_HOST}/api/packages/${GITEA_OWNER}/npm/:_authToken=${TOKEN}
|
||||||
|
EOF
|
||||||
|
npm publish
|
||||||
|
|
||||||
|
- name: Publish to the Gitea PyPI registry
|
||||||
|
working-directory: pulumi-dokploy/sdk/python
|
||||||
|
env:
|
||||||
|
TWINE_USERNAME: ${{ env.GITEA_OWNER }}
|
||||||
|
TWINE_PASSWORD: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade build twine
|
||||||
|
python -m build
|
||||||
|
python -m twine upload \
|
||||||
|
--repository-url "https://${GITEA_HOST}/api/packages/${GITEA_OWNER}/pypi" \
|
||||||
|
dist/*
|
||||||
|
|
||||||
|
- name: Publish to the Gitea NuGet registry
|
||||||
|
working-directory: pulumi-dokploy/sdk/dotnet
|
||||||
|
env:
|
||||||
|
TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
run: |
|
||||||
|
dotnet pack --configuration Release --output ./nupkg
|
||||||
|
dotnet nuget push ./nupkg/*.nupkg \
|
||||||
|
--source "https://${GITEA_HOST}/api/packages/${GITEA_OWNER}/nuget/index.json" \
|
||||||
|
--api-key "$TOKEN" --skip-duplicate
|
||||||
|
|
||||||
|
# The Go SDK's module path stays github.com/maxvojtkov/..., which no
|
||||||
|
# amount of Gitea hosting changes. Uploading it to Gitea's Go registry is
|
||||||
|
# what makes that path resolvable anyway: consumers point GOPROXY here.
|
||||||
|
#
|
||||||
|
# A module zip must have every entry prefixed `<module>@<version>/` and
|
||||||
|
# must contain no directory entries at all -- hence `zip -D`, without
|
||||||
|
# which `go get` fails with "has unexpected file".
|
||||||
|
- name: Publish the Go SDK to the Gitea Go registry
|
||||||
|
working-directory: pulumi-dokploy
|
||||||
|
env:
|
||||||
|
TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
MODULE=github.com/maxvojtkov/pulumi-dokploy/sdk
|
||||||
|
STAGE="$(mktemp -d)"
|
||||||
|
DEST="$STAGE/$MODULE@v${VERSION}"
|
||||||
|
mkdir -p "$DEST"
|
||||||
|
cp sdk/go.mod sdk/go.sum "$DEST/"
|
||||||
|
cp -R sdk/go "$DEST/"
|
||||||
|
(cd "$STAGE" && zip -qrD "$STAGE/sdk.zip" . -x 'sdk.zip')
|
||||||
|
curl -fsSL -X PUT \
|
||||||
|
--user "${GITEA_OWNER}:${TOKEN}" \
|
||||||
|
--upload-file "$STAGE/sdk.zip" \
|
||||||
|
"https://${GITEA_HOST}/api/packages/${GITEA_OWNER}/go/upload"
|
||||||
|
echo "Published $MODULE@v${VERSION}"
|
||||||
121
.github/workflows/release.yml
vendored
121
.github/workflows/release.yml
vendored
@@ -1,121 +0,0 @@
|
|||||||
name: release
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "v*.*.*"
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
env:
|
|
||||||
GO_VERSION: "1.25.x"
|
|
||||||
NODE_VERSION: "20.x"
|
|
||||||
PYTHON_VERSION: "3.11"
|
|
||||||
DOTNET_VERSION: "8.0.x"
|
|
||||||
UPSTREAM_REPO: maxvojtkov/terraform-provider-dokploy
|
|
||||||
UPSTREAM_DIR: dokploy-teraform
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
# Publishes the plugin binaries. Pulumi resolves them from this release via
|
|
||||||
# the provider's `github://api.github.com/maxvojtkov/pulumi-dokploy` URL.
|
|
||||||
plugin:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
path: pulumi-dokploy
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: ${{ env.UPSTREAM_REPO }}
|
|
||||||
path: ${{ env.UPSTREAM_DIR }}
|
|
||||||
|
|
||||||
- uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: ${{ env.GO_VERSION }}
|
|
||||||
|
|
||||||
- uses: goreleaser/goreleaser-action@v6
|
|
||||||
with:
|
|
||||||
version: latest
|
|
||||||
args: release --clean
|
|
||||||
workdir: pulumi-dokploy
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
sdks:
|
|
||||||
needs: plugin
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
path: pulumi-dokploy
|
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: ${{ env.UPSTREAM_REPO }}
|
|
||||||
path: ${{ env.UPSTREAM_DIR }}
|
|
||||||
|
|
||||||
- uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: ${{ env.GO_VERSION }}
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: ${{ env.NODE_VERSION }}
|
|
||||||
registry-url: https://registry.npmjs.org
|
|
||||||
|
|
||||||
- uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
|
||||||
|
|
||||||
- uses: actions/setup-dotnet@v4
|
|
||||||
with:
|
|
||||||
dotnet-version: ${{ env.DOTNET_VERSION }}
|
|
||||||
|
|
||||||
- name: Derive version from tag
|
|
||||||
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV"
|
|
||||||
|
|
||||||
- name: Build SDKs
|
|
||||||
working-directory: pulumi-dokploy
|
|
||||||
run: make build_sdks VERSION=${{ env.VERSION }}
|
|
||||||
|
|
||||||
- name: Publish to npm
|
|
||||||
working-directory: pulumi-dokploy/sdk/nodejs/bin
|
|
||||||
run: npm publish --access public
|
|
||||||
env:
|
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
||||||
|
|
||||||
- name: Publish to PyPI
|
|
||||||
working-directory: pulumi-dokploy/sdk/python
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade build twine
|
|
||||||
python -m build
|
|
||||||
python -m twine upload dist/*
|
|
||||||
env:
|
|
||||||
TWINE_USERNAME: __token__
|
|
||||||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
|
||||||
|
|
||||||
- name: Publish to NuGet
|
|
||||||
working-directory: pulumi-dokploy/sdk/dotnet
|
|
||||||
run: |
|
|
||||||
dotnet pack --configuration Release --output ./nupkg
|
|
||||||
dotnet nuget push ./nupkg/*.nupkg \
|
|
||||||
--source https://api.nuget.org/v3/index.json \
|
|
||||||
--api-key "$NUGET_PUBLISH_KEY" --skip-duplicate
|
|
||||||
env:
|
|
||||||
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
|
|
||||||
|
|
||||||
# Go modules are consumed straight from the repository, so the generated
|
|
||||||
# SDK has to be committed and tagged as `sdk/vX.Y.Z`.
|
|
||||||
- name: Commit and tag the Go SDK
|
|
||||||
working-directory: pulumi-dokploy
|
|
||||||
run: |
|
|
||||||
git config user.name "github-actions[bot]"
|
|
||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
||||||
git add sdk provider/cmd/pulumi-resource-dokploy/schema.json \
|
|
||||||
provider/cmd/pulumi-resource-dokploy/bridge-metadata.json
|
|
||||||
git diff --cached --quiet || git commit -m "chore: SDKs for v${{ env.VERSION }}"
|
|
||||||
git tag "sdk/v${{ env.VERSION }}"
|
|
||||||
git push origin HEAD:main --tags
|
|
||||||
@@ -1,7 +1,12 @@
|
|||||||
# Builds the provider plugin for every platform Pulumi supports and publishes
|
# Builds the provider plugin for every platform Pulumi supports and publishes
|
||||||
# the archives to a GitHub release. The archive names must match what
|
# the archives to a Gitea release.
|
||||||
# `PluginDownloadURL: github://api.github.com/maxvojtkov/pulumi-dokploy`
|
#
|
||||||
# expects, so do not rename them.
|
# Pulumi fetches these itself, from the PluginDownloadURL baked into the
|
||||||
|
# schema. Given
|
||||||
|
# https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}
|
||||||
|
# it appends `pulumi-resource-dokploy-v<version>-<os>-<arch>.tar.gz`, which is
|
||||||
|
# exactly what the archive name_template below produces. Rename one and you
|
||||||
|
# must rename the other, or `pulumi up` fails with a 404 on plugin install.
|
||||||
version: 2
|
version: 2
|
||||||
|
|
||||||
project_name: pulumi-dokploy
|
project_name: pulumi-dokploy
|
||||||
@@ -44,12 +49,20 @@ snapshot:
|
|||||||
version_template: "{{ .Version }}-SNAPSHOT"
|
version_template: "{{ .Version }}-SNAPSHOT"
|
||||||
|
|
||||||
changelog:
|
changelog:
|
||||||
use: github
|
use: git
|
||||||
|
sort: asc
|
||||||
filters:
|
filters:
|
||||||
exclude:
|
exclude:
|
||||||
- "^docs:"
|
- "^docs:"
|
||||||
- "^chore:"
|
- "^chore:"
|
||||||
- "^test:"
|
- "^test:"
|
||||||
|
|
||||||
|
gitea_urls:
|
||||||
|
api: https://gitea.coolify.vojtkov.dev/api/v1
|
||||||
|
download: https://gitea.coolify.vojtkov.dev
|
||||||
|
|
||||||
release:
|
release:
|
||||||
|
gitea:
|
||||||
|
owner: usr_unknown
|
||||||
|
name: pulumi-dokploy
|
||||||
prerelease: auto
|
prerelease: auto
|
||||||
|
|||||||
82
README.md
82
README.md
@@ -6,7 +6,7 @@ redirects, basic auth, registries, SSH keys, certificates and backup
|
|||||||
destinations.
|
destinations.
|
||||||
|
|
||||||
This is a *bridged* provider. All of the behaviour lives in
|
This is a *bridged* provider. All of the behaviour lives in
|
||||||
[`terraform-provider-dokploy`](https://github.com/maxvojtkov/terraform-provider-dokploy);
|
[`terraform-provider-dokploy`](https://gitea.coolify.vojtkov.dev/usr_unknown/terraform-provider-dokploy);
|
||||||
[`pulumi-terraform-bridge`](https://github.com/pulumi/pulumi-terraform-bridge)
|
[`pulumi-terraform-bridge`](https://github.com/pulumi/pulumi-terraform-bridge)
|
||||||
turns it into a Pulumi package with typed SDKs for TypeScript, Python, Go and
|
turns it into a Pulumi package with typed SDKs for TypeScript, Python, Go and
|
||||||
.NET. The two providers stay in lockstep — a resource added upstream shows up
|
.NET. The two providers stay in lockstep — a resource added upstream shows up
|
||||||
@@ -57,23 +57,52 @@ new dokploy.Domain("api", {
|
|||||||
|
|
||||||
## Installing
|
## Installing
|
||||||
|
|
||||||
The SDKs are published per language; the plugin binary is resolved
|
The SDKs live in this Gitea instance's package registries, and the plugin
|
||||||
automatically from this repository's GitHub releases.
|
binary is resolved automatically from this repository's Gitea releases — the
|
||||||
|
download URL is baked into the schema, so `pulumi up` fetches it without any
|
||||||
|
configuration.
|
||||||
|
|
||||||
|
The SDKs do need one-time registry configuration, because none of these
|
||||||
|
package managers know about a private host by default.
|
||||||
|
|
||||||
|
**TypeScript / JavaScript**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# TypeScript / JavaScript
|
npm config set @maxvojtkov:registry \
|
||||||
|
https://gitea.coolify.vojtkov.dev/api/packages/usr_unknown/npm/
|
||||||
npm install @maxvojtkov/pulumi-dokploy
|
npm install @maxvojtkov/pulumi-dokploy
|
||||||
|
```
|
||||||
|
|
||||||
# Python
|
**Python**
|
||||||
pip install pulumi_dokploy
|
|
||||||
|
|
||||||
# Go
|
```bash
|
||||||
go get github.com/maxvojtkov/pulumi-dokploy/sdk/go/dokploy
|
pip install pulumi_dokploy \
|
||||||
|
--index-url https://gitea.coolify.vojtkov.dev/api/packages/usr_unknown/pypi/simple
|
||||||
|
```
|
||||||
|
|
||||||
# .NET
|
**.NET**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
dotnet nuget add source \
|
||||||
|
https://gitea.coolify.vojtkov.dev/api/packages/usr_unknown/nuget/index.json \
|
||||||
|
--name gitea-dokploy
|
||||||
dotnet add package Maxvojtkov.Dokploy
|
dotnet add package Maxvojtkov.Dokploy
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Go** — the module path stays `github.com/maxvojtkov/...` even though nothing
|
||||||
|
is hosted on GitHub, so point the proxy at Gitea and skip the public checksum
|
||||||
|
database for that path:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export GOPROXY=https://gitea.coolify.vojtkov.dev/api/packages/usr_unknown/go,direct
|
||||||
|
export GONOSUMDB='github.com/maxvojtkov/*'
|
||||||
|
go get github.com/maxvojtkov/pulumi-dokploy/sdk/go/dokploy
|
||||||
|
```
|
||||||
|
|
||||||
|
If the registries are private, add credentials the usual way for each tool —
|
||||||
|
an `_authToken` in `.npmrc`, `--extra-index-url` with basic auth for pip, and
|
||||||
|
`--username`/`--password` on the `dotnet nuget add source`.
|
||||||
|
|
||||||
Before the first release, build and install it locally instead:
|
Before the first release, build and install it locally instead:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -130,7 +159,7 @@ Like the Terraform provider, this one manages *configuration*, not *rollouts*.
|
|||||||
Creating an `Application` writes its definition; it does not build or start
|
Creating an `Application` writes its definition; it does not build or start
|
||||||
anything.
|
anything.
|
||||||
|
|
||||||
[`dokploy-deploy-action`](https://github.com/maxvojtkov/dokploy-deploy-action)
|
[`dokploy-deploy-action`](https://gitea.coolify.vojtkov.dev/usr_unknown/dokploy-deploy-action)
|
||||||
covers the other half on GitHub Actions and Gitea Actions: it triggers a
|
covers the other half on GitHub Actions and Gitea Actions: it triggers a
|
||||||
deployment, waits for the build, and fails the job when the deployment fails.
|
deployment, waits for the build, and fails the job when the deployment fails.
|
||||||
Export the application id from your stack and hand it over.
|
Export the application id from your stack and hand it over.
|
||||||
@@ -140,7 +169,7 @@ export const apiApplicationId = api.id;
|
|||||||
```
|
```
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: maxvojtkov/dokploy-deploy-action@v1
|
- uses: https://gitea.coolify.vojtkov.dev/usr_unknown/dokploy-deploy-action@v1
|
||||||
with:
|
with:
|
||||||
host: ${{ secrets.DOKPLOY_HOST }}
|
host: ${{ secrets.DOKPLOY_HOST }}
|
||||||
api-key: ${{ secrets.DOKPLOY_API_KEY }}
|
api-key: ${{ secrets.DOKPLOY_API_KEY }}
|
||||||
@@ -163,7 +192,7 @@ Pulumi conventions applied on top:
|
|||||||
instead — see [`examples/typescript/webService.ts`](examples/typescript/webService.ts),
|
instead — see [`examples/typescript/webService.ts`](examples/typescript/webService.ts),
|
||||||
which is a port of that module.
|
which is a port of that module.
|
||||||
|
|
||||||
The [known API quirks](https://github.com/maxvojtkov/terraform-provider-dokploy#known-api-quirks)
|
The [known API quirks](https://gitea.coolify.vojtkov.dev/usr_unknown/terraform-provider-dokploy#known-api-quirks)
|
||||||
documented upstream apply here unchanged, because it is the same code doing the
|
documented upstream apply here unchanged, because it is the same code doing the
|
||||||
work.
|
work.
|
||||||
|
|
||||||
@@ -200,11 +229,16 @@ replace github.com/maxvojtkov/terraform-provider-dokploy => ../../dokploy-terafo
|
|||||||
```
|
```
|
||||||
|
|
||||||
so the two repositories can be developed side by side. CI reproduces that
|
so the two repositories can be developed side by side. CI reproduces that
|
||||||
layout by checking the upstream provider out as a sibling directory. Once
|
layout by checking the upstream provider out as a sibling directory.
|
||||||
`terraform-provider-dokploy` is tagged on GitHub, drop the `replace` and pin a
|
|
||||||
real version instead:
|
The `replace` is load-bearing here, not just a convenience: the module path
|
||||||
|
says `github.com`, but the code lives on Gitea, and Go has no way to discover
|
||||||
|
that on its own. It can go away once the upstream provider is published to
|
||||||
|
Gitea's Go registry, at which point the module resolves through `GOPROXY`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
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 \
|
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.1.0
|
||||||
```
|
```
|
||||||
@@ -221,10 +255,20 @@ Tag the repository and the `release` workflow does the rest:
|
|||||||
git tag v0.1.0 && git push origin v0.1.0
|
git tag v0.1.0 && git push origin v0.1.0
|
||||||
```
|
```
|
||||||
|
|
||||||
It publishes plugin binaries to a GitHub release via GoReleaser, pushes the
|
GoReleaser publishes the plugin binaries to a Gitea release first — Pulumi
|
||||||
npm / PyPI / NuGet packages, and commits and tags the Go SDK as `sdk/v0.1.0`.
|
resolves the plugin from there, so it has to exist before anyone installs an
|
||||||
The workflow needs three repository secrets: `NPM_TOKEN`, `PYPI_API_TOKEN` and
|
SDK — and then the four SDKs go to this instance's npm, PyPI, NuGet and Go
|
||||||
`NUGET_PUBLISH_KEY`.
|
registries.
|
||||||
|
|
||||||
|
**No secrets to configure.** Every step authenticates with `secrets.GITEA_TOKEN`,
|
||||||
|
which Gitea injects into each run automatically.
|
||||||
|
|
||||||
|
Two things the workflow depends on:
|
||||||
|
|
||||||
|
- A registered `act_runner` with an `ubuntu-latest` label, and enough of a
|
||||||
|
toolchain for Go, Node, Python and .NET.
|
||||||
|
- The upstream `terraform-provider-dokploy` repository being readable by that
|
||||||
|
token, since the `replace` directive needs it checked out as a sibling.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
@@ -11,11 +11,11 @@
|
|||||||
"category/cloud",
|
"category/cloud",
|
||||||
"category/infrastructure"
|
"category/infrastructure"
|
||||||
],
|
],
|
||||||
"homepage": "https://github.com/maxvojtkov/pulumi-dokploy",
|
"homepage": "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"attribution": "This Pulumi package is based on the [`dokploy` Terraform Provider](https://github.com/maxvojtkov/terraform-provider-dokploy).",
|
"attribution": "This Pulumi package is based on the [`dokploy` Terraform Provider](https://github.com/maxvojtkov/terraform-provider-dokploy).",
|
||||||
"repository": "https://github.com/maxvojtkov/pulumi-dokploy",
|
"repository": "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy",
|
||||||
"pluginDownloadURL": "github://api.github.com/maxvojtkov/pulumi-dokploy",
|
"pluginDownloadURL": "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}",
|
||||||
"publisher": "maxvojtkov",
|
"publisher": "maxvojtkov",
|
||||||
"meta": {
|
"meta": {
|
||||||
"moduleFormat": "(.*)(?:/[^/]*)"
|
"moduleFormat": "(.*)(?:/[^/]*)"
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
"nodejs": {
|
"nodejs": {
|
||||||
"packageName": "@maxvojtkov/pulumi-dokploy",
|
"packageName": "@maxvojtkov/pulumi-dokploy",
|
||||||
"packageDescription": "A Pulumi package for creating and managing Dokploy resources. Based on terraform-provider-dokploy: version v0.1.0",
|
"packageDescription": "A Pulumi package for creating and managing Dokploy resources. Based on terraform-provider-dokploy: version v0.1.0",
|
||||||
"readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/maxvojtkov/terraform-provider-dokploy)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi-dokploy` repo](https://github.com/maxvojtkov/pulumi-dokploy/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-dokploy` repo](https://github.com/maxvojtkov/terraform-provider-dokploy/issues).",
|
"readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/maxvojtkov/terraform-provider-dokploy)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi-dokploy` repo](https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-dokploy` repo](https://github.com/maxvojtkov/terraform-provider-dokploy/issues).",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pulumi/pulumi": "^3.0.0"
|
"@pulumi/pulumi": "^3.0.0"
|
||||||
},
|
},
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"pulumi": "\u003e=3.0.0,\u003c4.0.0"
|
"pulumi": "\u003e=3.0.0,\u003c4.0.0"
|
||||||
},
|
},
|
||||||
"readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/maxvojtkov/terraform-provider-dokploy)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi-dokploy` repo](https://github.com/maxvojtkov/pulumi-dokploy/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-dokploy` repo](https://github.com/maxvojtkov/terraform-provider-dokploy/issues).",
|
"readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/maxvojtkov/terraform-provider-dokploy)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi-dokploy` repo](https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-dokploy` repo](https://github.com/maxvojtkov/terraform-provider-dokploy/issues).",
|
||||||
"compatibility": "tfbridge20",
|
"compatibility": "tfbridge20",
|
||||||
"respectSchemaVersion": true,
|
"respectSchemaVersion": true,
|
||||||
"pyproject": {
|
"pyproject": {
|
||||||
|
|||||||
@@ -51,14 +51,18 @@ func Provider(version string) tfbridge.ProviderInfo {
|
|||||||
"category/cloud", "category/infrastructure",
|
"category/cloud", "category/infrastructure",
|
||||||
},
|
},
|
||||||
License: "MPL-2.0",
|
License: "MPL-2.0",
|
||||||
Homepage: "https://github.com/maxvojtkov/pulumi-dokploy",
|
Homepage: "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy",
|
||||||
Repository: "https://github.com/maxvojtkov/pulumi-dokploy",
|
Repository: "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy",
|
||||||
GitHubOrg: "maxvojtkov",
|
GitHubOrg: "maxvojtkov",
|
||||||
Version: version,
|
Version: version,
|
||||||
|
|
||||||
// This is not a Pulumi-published provider, so the plugin binary is
|
// This is not a Pulumi-published provider, so the plugin binary comes
|
||||||
// resolved from GitHub releases rather than the Pulumi CDN.
|
// from this repository's Gitea releases rather than the Pulumi CDN.
|
||||||
PluginDownloadURL: "github://api.github.com/maxvojtkov/pulumi-dokploy",
|
// Pulumi interpolates ${VERSION}, trims the trailing slash, then
|
||||||
|
// appends pulumi-resource-dokploy-v<version>-<os>-<arch>.tar.gz -- so
|
||||||
|
// this has to stay in step with the archive name_template in
|
||||||
|
// .goreleaser.yml.
|
||||||
|
PluginDownloadURL: "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}",
|
||||||
|
|
||||||
TFProviderVersion: version,
|
TFProviderVersion: version,
|
||||||
MetadataInfo: tfbridge.NewProviderMetadata(bridgeMetadata),
|
MetadataInfo: tfbridge.NewProviderMetadata(bridgeMetadata),
|
||||||
|
|||||||
2
sdk/dotnet/Application.cs
generated
2
sdk/dotnet/Application.cs
generated
@@ -612,7 +612,7 @@ namespace Maxvojtkov.Dokploy
|
|||||||
var defaultOptions = new CustomResourceOptions
|
var defaultOptions = new CustomResourceOptions
|
||||||
{
|
{
|
||||||
Version = Utilities.Version,
|
Version = Utilities.Version,
|
||||||
PluginDownloadURL = "github://api.github.com/maxvojtkov/pulumi-dokploy",
|
PluginDownloadURL = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}",
|
||||||
AdditionalSecretOutputs =
|
AdditionalSecretOutputs =
|
||||||
{
|
{
|
||||||
"buildSecrets",
|
"buildSecrets",
|
||||||
|
|||||||
2
sdk/dotnet/Certificate.cs
generated
2
sdk/dotnet/Certificate.cs
generated
@@ -72,7 +72,7 @@ namespace Maxvojtkov.Dokploy
|
|||||||
var defaultOptions = new CustomResourceOptions
|
var defaultOptions = new CustomResourceOptions
|
||||||
{
|
{
|
||||||
Version = Utilities.Version,
|
Version = Utilities.Version,
|
||||||
PluginDownloadURL = "github://api.github.com/maxvojtkov/pulumi-dokploy",
|
PluginDownloadURL = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}",
|
||||||
AdditionalSecretOutputs =
|
AdditionalSecretOutputs =
|
||||||
{
|
{
|
||||||
"privateKey",
|
"privateKey",
|
||||||
|
|||||||
2
sdk/dotnet/Compose.cs
generated
2
sdk/dotnet/Compose.cs
generated
@@ -300,7 +300,7 @@ namespace Maxvojtkov.Dokploy
|
|||||||
var defaultOptions = new CustomResourceOptions
|
var defaultOptions = new CustomResourceOptions
|
||||||
{
|
{
|
||||||
Version = Utilities.Version,
|
Version = Utilities.Version,
|
||||||
PluginDownloadURL = "github://api.github.com/maxvojtkov/pulumi-dokploy",
|
PluginDownloadURL = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}",
|
||||||
};
|
};
|
||||||
var merged = CustomResourceOptions.Merge(defaultOptions, options);
|
var merged = CustomResourceOptions.Merge(defaultOptions, options);
|
||||||
// Override the ID if one was specified for consistency with other language SDKs.
|
// Override the ID if one was specified for consistency with other language SDKs.
|
||||||
|
|||||||
2
sdk/dotnet/Destination.cs
generated
2
sdk/dotnet/Destination.cs
generated
@@ -96,7 +96,7 @@ namespace Maxvojtkov.Dokploy
|
|||||||
var defaultOptions = new CustomResourceOptions
|
var defaultOptions = new CustomResourceOptions
|
||||||
{
|
{
|
||||||
Version = Utilities.Version,
|
Version = Utilities.Version,
|
||||||
PluginDownloadURL = "github://api.github.com/maxvojtkov/pulumi-dokploy",
|
PluginDownloadURL = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}",
|
||||||
AdditionalSecretOutputs =
|
AdditionalSecretOutputs =
|
||||||
{
|
{
|
||||||
"secretAccessKey",
|
"secretAccessKey",
|
||||||
|
|||||||
2
sdk/dotnet/Domain.cs
generated
2
sdk/dotnet/Domain.cs
generated
@@ -138,7 +138,7 @@ namespace Maxvojtkov.Dokploy
|
|||||||
var defaultOptions = new CustomResourceOptions
|
var defaultOptions = new CustomResourceOptions
|
||||||
{
|
{
|
||||||
Version = Utilities.Version,
|
Version = Utilities.Version,
|
||||||
PluginDownloadURL = "github://api.github.com/maxvojtkov/pulumi-dokploy",
|
PluginDownloadURL = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}",
|
||||||
};
|
};
|
||||||
var merged = CustomResourceOptions.Merge(defaultOptions, options);
|
var merged = CustomResourceOptions.Merge(defaultOptions, options);
|
||||||
// Override the ID if one was specified for consistency with other language SDKs.
|
// Override the ID if one was specified for consistency with other language SDKs.
|
||||||
|
|||||||
2
sdk/dotnet/Environment.cs
generated
2
sdk/dotnet/Environment.cs
generated
@@ -72,7 +72,7 @@ namespace Maxvojtkov.Dokploy
|
|||||||
var defaultOptions = new CustomResourceOptions
|
var defaultOptions = new CustomResourceOptions
|
||||||
{
|
{
|
||||||
Version = Utilities.Version,
|
Version = Utilities.Version,
|
||||||
PluginDownloadURL = "github://api.github.com/maxvojtkov/pulumi-dokploy",
|
PluginDownloadURL = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}",
|
||||||
};
|
};
|
||||||
var merged = CustomResourceOptions.Merge(defaultOptions, options);
|
var merged = CustomResourceOptions.Merge(defaultOptions, options);
|
||||||
// Override the ID if one was specified for consistency with other language SDKs.
|
// Override the ID if one was specified for consistency with other language SDKs.
|
||||||
|
|||||||
2
sdk/dotnet/MariaDb.cs
generated
2
sdk/dotnet/MariaDb.cs
generated
@@ -240,7 +240,7 @@ namespace Maxvojtkov.Dokploy
|
|||||||
var defaultOptions = new CustomResourceOptions
|
var defaultOptions = new CustomResourceOptions
|
||||||
{
|
{
|
||||||
Version = Utilities.Version,
|
Version = Utilities.Version,
|
||||||
PluginDownloadURL = "github://api.github.com/maxvojtkov/pulumi-dokploy",
|
PluginDownloadURL = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}",
|
||||||
AdditionalSecretOutputs =
|
AdditionalSecretOutputs =
|
||||||
{
|
{
|
||||||
"databasePassword",
|
"databasePassword",
|
||||||
|
|||||||
4
sdk/dotnet/Maxvojtkov.Dokploy.csproj
generated
4
sdk/dotnet/Maxvojtkov.Dokploy.csproj
generated
@@ -6,8 +6,8 @@
|
|||||||
<Company>maxvojtkov</Company>
|
<Company>maxvojtkov</Company>
|
||||||
<Description>A Pulumi package for creating and managing Dokploy resources</Description>
|
<Description>A Pulumi package for creating and managing Dokploy resources</Description>
|
||||||
<PackageLicenseExpression>MPL-2.0</PackageLicenseExpression>
|
<PackageLicenseExpression>MPL-2.0</PackageLicenseExpression>
|
||||||
<PackageProjectUrl>https://github.com/maxvojtkov/pulumi-dokploy</PackageProjectUrl>
|
<PackageProjectUrl>https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy</PackageProjectUrl>
|
||||||
<RepositoryUrl>https://github.com/maxvojtkov/pulumi-dokploy</RepositoryUrl>
|
<RepositoryUrl>https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy</RepositoryUrl>
|
||||||
<PackageIcon>logo.png</PackageIcon>
|
<PackageIcon>logo.png</PackageIcon>
|
||||||
<Version>0.1.0</Version>
|
<Version>0.1.0</Version>
|
||||||
|
|
||||||
|
|||||||
2
sdk/dotnet/Mongo.cs
generated
2
sdk/dotnet/Mongo.cs
generated
@@ -234,7 +234,7 @@ namespace Maxvojtkov.Dokploy
|
|||||||
var defaultOptions = new CustomResourceOptions
|
var defaultOptions = new CustomResourceOptions
|
||||||
{
|
{
|
||||||
Version = Utilities.Version,
|
Version = Utilities.Version,
|
||||||
PluginDownloadURL = "github://api.github.com/maxvojtkov/pulumi-dokploy",
|
PluginDownloadURL = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}",
|
||||||
AdditionalSecretOutputs =
|
AdditionalSecretOutputs =
|
||||||
{
|
{
|
||||||
"databasePassword",
|
"databasePassword",
|
||||||
|
|||||||
2
sdk/dotnet/Mount.cs
generated
2
sdk/dotnet/Mount.cs
generated
@@ -84,7 +84,7 @@ namespace Maxvojtkov.Dokploy
|
|||||||
var defaultOptions = new CustomResourceOptions
|
var defaultOptions = new CustomResourceOptions
|
||||||
{
|
{
|
||||||
Version = Utilities.Version,
|
Version = Utilities.Version,
|
||||||
PluginDownloadURL = "github://api.github.com/maxvojtkov/pulumi-dokploy",
|
PluginDownloadURL = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}",
|
||||||
};
|
};
|
||||||
var merged = CustomResourceOptions.Merge(defaultOptions, options);
|
var merged = CustomResourceOptions.Merge(defaultOptions, options);
|
||||||
// Override the ID if one was specified for consistency with other language SDKs.
|
// Override the ID if one was specified for consistency with other language SDKs.
|
||||||
|
|||||||
2
sdk/dotnet/MySql.cs
generated
2
sdk/dotnet/MySql.cs
generated
@@ -240,7 +240,7 @@ namespace Maxvojtkov.Dokploy
|
|||||||
var defaultOptions = new CustomResourceOptions
|
var defaultOptions = new CustomResourceOptions
|
||||||
{
|
{
|
||||||
Version = Utilities.Version,
|
Version = Utilities.Version,
|
||||||
PluginDownloadURL = "github://api.github.com/maxvojtkov/pulumi-dokploy",
|
PluginDownloadURL = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}",
|
||||||
AdditionalSecretOutputs =
|
AdditionalSecretOutputs =
|
||||||
{
|
{
|
||||||
"databasePassword",
|
"databasePassword",
|
||||||
|
|||||||
2
sdk/dotnet/Port.cs
generated
2
sdk/dotnet/Port.cs
generated
@@ -66,7 +66,7 @@ namespace Maxvojtkov.Dokploy
|
|||||||
var defaultOptions = new CustomResourceOptions
|
var defaultOptions = new CustomResourceOptions
|
||||||
{
|
{
|
||||||
Version = Utilities.Version,
|
Version = Utilities.Version,
|
||||||
PluginDownloadURL = "github://api.github.com/maxvojtkov/pulumi-dokploy",
|
PluginDownloadURL = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}",
|
||||||
};
|
};
|
||||||
var merged = CustomResourceOptions.Merge(defaultOptions, options);
|
var merged = CustomResourceOptions.Merge(defaultOptions, options);
|
||||||
// Override the ID if one was specified for consistency with other language SDKs.
|
// Override the ID if one was specified for consistency with other language SDKs.
|
||||||
|
|||||||
2
sdk/dotnet/Postgres.cs
generated
2
sdk/dotnet/Postgres.cs
generated
@@ -234,7 +234,7 @@ namespace Maxvojtkov.Dokploy
|
|||||||
var defaultOptions = new CustomResourceOptions
|
var defaultOptions = new CustomResourceOptions
|
||||||
{
|
{
|
||||||
Version = Utilities.Version,
|
Version = Utilities.Version,
|
||||||
PluginDownloadURL = "github://api.github.com/maxvojtkov/pulumi-dokploy",
|
PluginDownloadURL = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}",
|
||||||
AdditionalSecretOutputs =
|
AdditionalSecretOutputs =
|
||||||
{
|
{
|
||||||
"databasePassword",
|
"databasePassword",
|
||||||
|
|||||||
2
sdk/dotnet/Project.cs
generated
2
sdk/dotnet/Project.cs
generated
@@ -72,7 +72,7 @@ namespace Maxvojtkov.Dokploy
|
|||||||
var defaultOptions = new CustomResourceOptions
|
var defaultOptions = new CustomResourceOptions
|
||||||
{
|
{
|
||||||
Version = Utilities.Version,
|
Version = Utilities.Version,
|
||||||
PluginDownloadURL = "github://api.github.com/maxvojtkov/pulumi-dokploy",
|
PluginDownloadURL = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}",
|
||||||
};
|
};
|
||||||
var merged = CustomResourceOptions.Merge(defaultOptions, options);
|
var merged = CustomResourceOptions.Merge(defaultOptions, options);
|
||||||
// Override the ID if one was specified for consistency with other language SDKs.
|
// Override the ID if one was specified for consistency with other language SDKs.
|
||||||
|
|||||||
2
sdk/dotnet/Provider.cs
generated
2
sdk/dotnet/Provider.cs
generated
@@ -49,7 +49,7 @@ namespace Maxvojtkov.Dokploy
|
|||||||
var defaultOptions = new CustomResourceOptions
|
var defaultOptions = new CustomResourceOptions
|
||||||
{
|
{
|
||||||
Version = Utilities.Version,
|
Version = Utilities.Version,
|
||||||
PluginDownloadURL = "github://api.github.com/maxvojtkov/pulumi-dokploy",
|
PluginDownloadURL = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}",
|
||||||
AdditionalSecretOutputs =
|
AdditionalSecretOutputs =
|
||||||
{
|
{
|
||||||
"apiKey",
|
"apiKey",
|
||||||
|
|||||||
103
sdk/dotnet/README.md
generated
103
sdk/dotnet/README.md
generated
@@ -6,7 +6,7 @@ redirects, basic auth, registries, SSH keys, certificates and backup
|
|||||||
destinations.
|
destinations.
|
||||||
|
|
||||||
This is a *bridged* provider. All of the behaviour lives in
|
This is a *bridged* provider. All of the behaviour lives in
|
||||||
[`terraform-provider-dokploy`](https://github.com/maxvojtkov/terraform-provider-dokploy);
|
[`terraform-provider-dokploy`](https://gitea.coolify.vojtkov.dev/usr_unknown/terraform-provider-dokploy);
|
||||||
[`pulumi-terraform-bridge`](https://github.com/pulumi/pulumi-terraform-bridge)
|
[`pulumi-terraform-bridge`](https://github.com/pulumi/pulumi-terraform-bridge)
|
||||||
turns it into a Pulumi package with typed SDKs for TypeScript, Python, Go and
|
turns it into a Pulumi package with typed SDKs for TypeScript, Python, Go and
|
||||||
.NET. The two providers stay in lockstep — a resource added upstream shows up
|
.NET. The two providers stay in lockstep — a resource added upstream shows up
|
||||||
@@ -49,6 +49,7 @@ new dokploy.Domain("api", {
|
|||||||
- [Installing](#installing)
|
- [Installing](#installing)
|
||||||
- [Configuration](#configuration)
|
- [Configuration](#configuration)
|
||||||
- [Resources and data sources](#resources-and-data-sources)
|
- [Resources and data sources](#resources-and-data-sources)
|
||||||
|
- [Deploying from CI](#deploying-from-ci)
|
||||||
- [Differences from the Terraform provider](#differences-from-the-terraform-provider)
|
- [Differences from the Terraform provider](#differences-from-the-terraform-provider)
|
||||||
- [Examples](#examples)
|
- [Examples](#examples)
|
||||||
- [Development](#development)
|
- [Development](#development)
|
||||||
@@ -56,23 +57,52 @@ new dokploy.Domain("api", {
|
|||||||
|
|
||||||
## Installing
|
## Installing
|
||||||
|
|
||||||
The SDKs are published per language; the plugin binary is resolved
|
The SDKs live in this Gitea instance's package registries, and the plugin
|
||||||
automatically from this repository's GitHub releases.
|
binary is resolved automatically from this repository's Gitea releases — the
|
||||||
|
download URL is baked into the schema, so `pulumi up` fetches it without any
|
||||||
|
configuration.
|
||||||
|
|
||||||
|
The SDKs do need one-time registry configuration, because none of these
|
||||||
|
package managers know about a private host by default.
|
||||||
|
|
||||||
|
**TypeScript / JavaScript**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# TypeScript / JavaScript
|
npm config set @maxvojtkov:registry \
|
||||||
|
https://gitea.coolify.vojtkov.dev/api/packages/usr_unknown/npm/
|
||||||
npm install @maxvojtkov/pulumi-dokploy
|
npm install @maxvojtkov/pulumi-dokploy
|
||||||
|
```
|
||||||
|
|
||||||
# Python
|
**Python**
|
||||||
pip install pulumi_dokploy
|
|
||||||
|
|
||||||
# Go
|
```bash
|
||||||
go get github.com/maxvojtkov/pulumi-dokploy/sdk/go/dokploy
|
pip install pulumi_dokploy \
|
||||||
|
--index-url https://gitea.coolify.vojtkov.dev/api/packages/usr_unknown/pypi/simple
|
||||||
|
```
|
||||||
|
|
||||||
# .NET
|
**.NET**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
dotnet nuget add source \
|
||||||
|
https://gitea.coolify.vojtkov.dev/api/packages/usr_unknown/nuget/index.json \
|
||||||
|
--name gitea-dokploy
|
||||||
dotnet add package Maxvojtkov.Dokploy
|
dotnet add package Maxvojtkov.Dokploy
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Go** — the module path stays `github.com/maxvojtkov/...` even though nothing
|
||||||
|
is hosted on GitHub, so point the proxy at Gitea and skip the public checksum
|
||||||
|
database for that path:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export GOPROXY=https://gitea.coolify.vojtkov.dev/api/packages/usr_unknown/go,direct
|
||||||
|
export GONOSUMDB='github.com/maxvojtkov/*'
|
||||||
|
go get github.com/maxvojtkov/pulumi-dokploy/sdk/go/dokploy
|
||||||
|
```
|
||||||
|
|
||||||
|
If the registries are private, add credentials the usual way for each tool —
|
||||||
|
an `_authToken` in `.npmrc`, `--extra-index-url` with basic auth for pip, and
|
||||||
|
`--username`/`--password` on the `dotnet nuget add source`.
|
||||||
|
|
||||||
Before the first release, build and install it locally instead:
|
Before the first release, build and install it locally instead:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -123,6 +153,30 @@ pulumi config set --secret dokploy:apiKey "$DOKPLOY_API_KEY"
|
|||||||
Data sources: `getProject`, `getProjects`, `getEnvironment`, `getApplication`,
|
Data sources: `getProject`, `getProjects`, `getEnvironment`, `getApplication`,
|
||||||
`getServers`.
|
`getServers`.
|
||||||
|
|
||||||
|
## Deploying from CI
|
||||||
|
|
||||||
|
Like the Terraform provider, this one manages *configuration*, not *rollouts*.
|
||||||
|
Creating an `Application` writes its definition; it does not build or start
|
||||||
|
anything.
|
||||||
|
|
||||||
|
[`dokploy-deploy-action`](https://gitea.coolify.vojtkov.dev/usr_unknown/dokploy-deploy-action)
|
||||||
|
covers the other half on GitHub Actions and Gitea Actions: it triggers a
|
||||||
|
deployment, waits for the build, and fails the job when the deployment fails.
|
||||||
|
Export the application id from your stack and hand it over.
|
||||||
|
|
||||||
|
```ts
|
||||||
|
export const apiApplicationId = api.id;
|
||||||
|
```
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- uses: https://gitea.coolify.vojtkov.dev/usr_unknown/dokploy-deploy-action@v1
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.DOKPLOY_HOST }}
|
||||||
|
api-key: ${{ secrets.DOKPLOY_API_KEY }}
|
||||||
|
application-id: ${{ steps.stack.outputs.apiApplicationId }}
|
||||||
|
docker-image: ghcr.io/acme/api:${{ github.sha }}
|
||||||
|
```
|
||||||
|
|
||||||
## Differences from the Terraform provider
|
## Differences from the Terraform provider
|
||||||
|
|
||||||
Everything is a mechanical translation of the Terraform provider, with three
|
Everything is a mechanical translation of the Terraform provider, with three
|
||||||
@@ -138,7 +192,7 @@ Pulumi conventions applied on top:
|
|||||||
instead — see [`examples/typescript/webService.ts`](examples/typescript/webService.ts),
|
instead — see [`examples/typescript/webService.ts`](examples/typescript/webService.ts),
|
||||||
which is a port of that module.
|
which is a port of that module.
|
||||||
|
|
||||||
The [known API quirks](https://github.com/maxvojtkov/terraform-provider-dokploy#known-api-quirks)
|
The [known API quirks](https://gitea.coolify.vojtkov.dev/usr_unknown/terraform-provider-dokploy#known-api-quirks)
|
||||||
documented upstream apply here unchanged, because it is the same code doing the
|
documented upstream apply here unchanged, because it is the same code doing the
|
||||||
work.
|
work.
|
||||||
|
|
||||||
@@ -175,11 +229,16 @@ replace github.com/maxvojtkov/terraform-provider-dokploy => ../../dokploy-terafo
|
|||||||
```
|
```
|
||||||
|
|
||||||
so the two repositories can be developed side by side. CI reproduces that
|
so the two repositories can be developed side by side. CI reproduces that
|
||||||
layout by checking the upstream provider out as a sibling directory. Once
|
layout by checking the upstream provider out as a sibling directory.
|
||||||
`terraform-provider-dokploy` is tagged on GitHub, drop the `replace` and pin a
|
|
||||||
real version instead:
|
The `replace` is load-bearing here, not just a convenience: the module path
|
||||||
|
says `github.com`, but the code lives on Gitea, and Go has no way to discover
|
||||||
|
that on its own. It can go away once the upstream provider is published to
|
||||||
|
Gitea's Go registry, at which point the module resolves through `GOPROXY`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
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 \
|
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.1.0
|
||||||
```
|
```
|
||||||
@@ -196,10 +255,20 @@ Tag the repository and the `release` workflow does the rest:
|
|||||||
git tag v0.1.0 && git push origin v0.1.0
|
git tag v0.1.0 && git push origin v0.1.0
|
||||||
```
|
```
|
||||||
|
|
||||||
It publishes plugin binaries to a GitHub release via GoReleaser, pushes the
|
GoReleaser publishes the plugin binaries to a Gitea release first — Pulumi
|
||||||
npm / PyPI / NuGet packages, and commits and tags the Go SDK as `sdk/v0.1.0`.
|
resolves the plugin from there, so it has to exist before anyone installs an
|
||||||
The workflow needs three repository secrets: `NPM_TOKEN`, `PYPI_API_TOKEN` and
|
SDK — and then the four SDKs go to this instance's npm, PyPI, NuGet and Go
|
||||||
`NUGET_PUBLISH_KEY`.
|
registries.
|
||||||
|
|
||||||
|
**No secrets to configure.** Every step authenticates with `secrets.GITEA_TOKEN`,
|
||||||
|
which Gitea injects into each run automatically.
|
||||||
|
|
||||||
|
Two things the workflow depends on:
|
||||||
|
|
||||||
|
- A registered `act_runner` with an `ubuntu-latest` label, and enough of a
|
||||||
|
toolchain for Go, Node, Python and .NET.
|
||||||
|
- The upstream `terraform-provider-dokploy` repository being readable by that
|
||||||
|
token, since the `replace` directive needs it checked out as a sibling.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
2
sdk/dotnet/Redirect.cs
generated
2
sdk/dotnet/Redirect.cs
generated
@@ -66,7 +66,7 @@ namespace Maxvojtkov.Dokploy
|
|||||||
var defaultOptions = new CustomResourceOptions
|
var defaultOptions = new CustomResourceOptions
|
||||||
{
|
{
|
||||||
Version = Utilities.Version,
|
Version = Utilities.Version,
|
||||||
PluginDownloadURL = "github://api.github.com/maxvojtkov/pulumi-dokploy",
|
PluginDownloadURL = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}",
|
||||||
};
|
};
|
||||||
var merged = CustomResourceOptions.Merge(defaultOptions, options);
|
var merged = CustomResourceOptions.Merge(defaultOptions, options);
|
||||||
// Override the ID if one was specified for consistency with other language SDKs.
|
// Override the ID if one was specified for consistency with other language SDKs.
|
||||||
|
|||||||
2
sdk/dotnet/Redis.cs
generated
2
sdk/dotnet/Redis.cs
generated
@@ -222,7 +222,7 @@ namespace Maxvojtkov.Dokploy
|
|||||||
var defaultOptions = new CustomResourceOptions
|
var defaultOptions = new CustomResourceOptions
|
||||||
{
|
{
|
||||||
Version = Utilities.Version,
|
Version = Utilities.Version,
|
||||||
PluginDownloadURL = "github://api.github.com/maxvojtkov/pulumi-dokploy",
|
PluginDownloadURL = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}",
|
||||||
AdditionalSecretOutputs =
|
AdditionalSecretOutputs =
|
||||||
{
|
{
|
||||||
"databasePassword",
|
"databasePassword",
|
||||||
|
|||||||
2
sdk/dotnet/Registry.cs
generated
2
sdk/dotnet/Registry.cs
generated
@@ -84,7 +84,7 @@ namespace Maxvojtkov.Dokploy
|
|||||||
var defaultOptions = new CustomResourceOptions
|
var defaultOptions = new CustomResourceOptions
|
||||||
{
|
{
|
||||||
Version = Utilities.Version,
|
Version = Utilities.Version,
|
||||||
PluginDownloadURL = "github://api.github.com/maxvojtkov/pulumi-dokploy",
|
PluginDownloadURL = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}",
|
||||||
AdditionalSecretOutputs =
|
AdditionalSecretOutputs =
|
||||||
{
|
{
|
||||||
"password",
|
"password",
|
||||||
|
|||||||
2
sdk/dotnet/Security.cs
generated
2
sdk/dotnet/Security.cs
generated
@@ -60,7 +60,7 @@ namespace Maxvojtkov.Dokploy
|
|||||||
var defaultOptions = new CustomResourceOptions
|
var defaultOptions = new CustomResourceOptions
|
||||||
{
|
{
|
||||||
Version = Utilities.Version,
|
Version = Utilities.Version,
|
||||||
PluginDownloadURL = "github://api.github.com/maxvojtkov/pulumi-dokploy",
|
PluginDownloadURL = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}",
|
||||||
AdditionalSecretOutputs =
|
AdditionalSecretOutputs =
|
||||||
{
|
{
|
||||||
"password",
|
"password",
|
||||||
|
|||||||
2
sdk/dotnet/SshKey.cs
generated
2
sdk/dotnet/SshKey.cs
generated
@@ -72,7 +72,7 @@ namespace Maxvojtkov.Dokploy
|
|||||||
var defaultOptions = new CustomResourceOptions
|
var defaultOptions = new CustomResourceOptions
|
||||||
{
|
{
|
||||||
Version = Utilities.Version,
|
Version = Utilities.Version,
|
||||||
PluginDownloadURL = "github://api.github.com/maxvojtkov/pulumi-dokploy",
|
PluginDownloadURL = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}",
|
||||||
AdditionalSecretOutputs =
|
AdditionalSecretOutputs =
|
||||||
{
|
{
|
||||||
"privateKey",
|
"privateKey",
|
||||||
|
|||||||
4
sdk/dotnet/Utilities.cs
generated
4
sdk/dotnet/Utilities.cs
generated
@@ -53,7 +53,7 @@ namespace Maxvojtkov.Dokploy
|
|||||||
{
|
{
|
||||||
var dst = src ?? new global::Pulumi.InvokeOptions{};
|
var dst = src ?? new global::Pulumi.InvokeOptions{};
|
||||||
dst.Version = src?.Version ?? Version;
|
dst.Version = src?.Version ?? Version;
|
||||||
dst.PluginDownloadURL = src?.PluginDownloadURL ?? "github://api.github.com/maxvojtkov/pulumi-dokploy";
|
dst.PluginDownloadURL = src?.PluginDownloadURL ?? "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}";
|
||||||
return dst;
|
return dst;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ namespace Maxvojtkov.Dokploy
|
|||||||
{
|
{
|
||||||
var dst = src ?? new global::Pulumi.InvokeOutputOptions{};
|
var dst = src ?? new global::Pulumi.InvokeOutputOptions{};
|
||||||
dst.Version = src?.Version ?? Version;
|
dst.Version = src?.Version ?? Version;
|
||||||
dst.PluginDownloadURL = src?.PluginDownloadURL ?? "github://api.github.com/maxvojtkov/pulumi-dokploy";
|
dst.PluginDownloadURL = src?.PluginDownloadURL ?? "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}";
|
||||||
return dst;
|
return dst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
sdk/dotnet/pulumi-plugin.json
generated
2
sdk/dotnet/pulumi-plugin.json
generated
@@ -2,5 +2,5 @@
|
|||||||
"resource": true,
|
"resource": true,
|
||||||
"name": "dokploy",
|
"name": "dokploy",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"server": "github://api.github.com/maxvojtkov/pulumi-dokploy"
|
"server": "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}"
|
||||||
}
|
}
|
||||||
|
|||||||
4
sdk/go/dokploy/internal/pulumiUtilities.go
generated
4
sdk/go/dokploy/internal/pulumiUtilities.go
generated
@@ -164,7 +164,7 @@ func callPlainInner(
|
|||||||
// PkgResourceDefaultOpts provides package level defaults to pulumi.OptionResource.
|
// PkgResourceDefaultOpts provides package level defaults to pulumi.OptionResource.
|
||||||
func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOption {
|
func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOption {
|
||||||
defaults := []pulumi.ResourceOption{}
|
defaults := []pulumi.ResourceOption{}
|
||||||
defaults = append(defaults, pulumi.PluginDownloadURL("github://api.github.com/maxvojtkov/pulumi-dokploy"))
|
defaults = append(defaults, pulumi.PluginDownloadURL("https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}"))
|
||||||
version := semver.MustParse("0.1.0")
|
version := semver.MustParse("0.1.0")
|
||||||
if !version.Equals(semver.Version{}) {
|
if !version.Equals(semver.Version{}) {
|
||||||
defaults = append(defaults, pulumi.Version(version.String()))
|
defaults = append(defaults, pulumi.Version(version.String()))
|
||||||
@@ -175,7 +175,7 @@ func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOptio
|
|||||||
// PkgInvokeDefaultOpts provides package level defaults to pulumi.OptionInvoke.
|
// PkgInvokeDefaultOpts provides package level defaults to pulumi.OptionInvoke.
|
||||||
func PkgInvokeDefaultOpts(opts []pulumi.InvokeOption) []pulumi.InvokeOption {
|
func PkgInvokeDefaultOpts(opts []pulumi.InvokeOption) []pulumi.InvokeOption {
|
||||||
defaults := []pulumi.InvokeOption{}
|
defaults := []pulumi.InvokeOption{}
|
||||||
defaults = append(defaults, pulumi.PluginDownloadURL("github://api.github.com/maxvojtkov/pulumi-dokploy"))
|
defaults = append(defaults, pulumi.PluginDownloadURL("https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}"))
|
||||||
version := semver.MustParse("0.1.0")
|
version := semver.MustParse("0.1.0")
|
||||||
if !version.Equals(semver.Version{}) {
|
if !version.Equals(semver.Version{}) {
|
||||||
defaults = append(defaults, pulumi.Version(version.String()))
|
defaults = append(defaults, pulumi.Version(version.String()))
|
||||||
|
|||||||
2
sdk/go/dokploy/pulumi-plugin.json
generated
2
sdk/go/dokploy/pulumi-plugin.json
generated
@@ -2,5 +2,5 @@
|
|||||||
"resource": true,
|
"resource": true,
|
||||||
"name": "dokploy",
|
"name": "dokploy",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"server": "github://api.github.com/maxvojtkov/pulumi-dokploy"
|
"server": "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}"
|
||||||
}
|
}
|
||||||
|
|||||||
2
sdk/nodejs/README.md
generated
2
sdk/nodejs/README.md
generated
@@ -1,4 +1,4 @@
|
|||||||
> This provider is a derived work of the [Terraform Provider](https://github.com/maxvojtkov/terraform-provider-dokploy)
|
> This provider is a derived work of the [Terraform Provider](https://github.com/maxvojtkov/terraform-provider-dokploy)
|
||||||
> distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,
|
> distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,
|
||||||
> first check the [`pulumi-dokploy` repo](https://github.com/maxvojtkov/pulumi-dokploy/issues); however, if that doesn't turn up anything,
|
> first check the [`pulumi-dokploy` repo](https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/issues); however, if that doesn't turn up anything,
|
||||||
> please consult the source [`terraform-provider-dokploy` repo](https://github.com/maxvojtkov/terraform-provider-dokploy/issues).
|
> please consult the source [`terraform-provider-dokploy` repo](https://github.com/maxvojtkov/terraform-provider-dokploy/issues).
|
||||||
|
|||||||
6
sdk/nodejs/package.json
generated
6
sdk/nodejs/package.json
generated
@@ -11,8 +11,8 @@
|
|||||||
"category/cloud",
|
"category/cloud",
|
||||||
"category/infrastructure"
|
"category/infrastructure"
|
||||||
],
|
],
|
||||||
"homepage": "https://github.com/maxvojtkov/pulumi-dokploy",
|
"homepage": "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy",
|
||||||
"repository": "https://github.com/maxvojtkov/pulumi-dokploy",
|
"repository": "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc"
|
"build": "tsc"
|
||||||
@@ -28,6 +28,6 @@
|
|||||||
"resource": true,
|
"resource": true,
|
||||||
"name": "dokploy",
|
"name": "dokploy",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"server": "github://api.github.com/maxvojtkov/pulumi-dokploy"
|
"server": "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
sdk/nodejs/utilities.ts
generated
2
sdk/nodejs/utilities.ts
generated
@@ -53,7 +53,7 @@ export function getVersion(): string {
|
|||||||
|
|
||||||
/** @internal */
|
/** @internal */
|
||||||
export function resourceOptsDefaults(): any {
|
export function resourceOptsDefaults(): any {
|
||||||
return { version: getVersion(), pluginDownloadURL: "github://api.github.com/maxvojtkov/pulumi-dokploy" };
|
return { version: getVersion(), pluginDownloadURL: "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}" };
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @internal */
|
/** @internal */
|
||||||
|
|||||||
103
sdk/python/README.md
generated
103
sdk/python/README.md
generated
@@ -6,7 +6,7 @@ redirects, basic auth, registries, SSH keys, certificates and backup
|
|||||||
destinations.
|
destinations.
|
||||||
|
|
||||||
This is a *bridged* provider. All of the behaviour lives in
|
This is a *bridged* provider. All of the behaviour lives in
|
||||||
[`terraform-provider-dokploy`](https://github.com/maxvojtkov/terraform-provider-dokploy);
|
[`terraform-provider-dokploy`](https://gitea.coolify.vojtkov.dev/usr_unknown/terraform-provider-dokploy);
|
||||||
[`pulumi-terraform-bridge`](https://github.com/pulumi/pulumi-terraform-bridge)
|
[`pulumi-terraform-bridge`](https://github.com/pulumi/pulumi-terraform-bridge)
|
||||||
turns it into a Pulumi package with typed SDKs for TypeScript, Python, Go and
|
turns it into a Pulumi package with typed SDKs for TypeScript, Python, Go and
|
||||||
.NET. The two providers stay in lockstep — a resource added upstream shows up
|
.NET. The two providers stay in lockstep — a resource added upstream shows up
|
||||||
@@ -49,6 +49,7 @@ new dokploy.Domain("api", {
|
|||||||
- [Installing](#installing)
|
- [Installing](#installing)
|
||||||
- [Configuration](#configuration)
|
- [Configuration](#configuration)
|
||||||
- [Resources and data sources](#resources-and-data-sources)
|
- [Resources and data sources](#resources-and-data-sources)
|
||||||
|
- [Deploying from CI](#deploying-from-ci)
|
||||||
- [Differences from the Terraform provider](#differences-from-the-terraform-provider)
|
- [Differences from the Terraform provider](#differences-from-the-terraform-provider)
|
||||||
- [Examples](#examples)
|
- [Examples](#examples)
|
||||||
- [Development](#development)
|
- [Development](#development)
|
||||||
@@ -56,23 +57,52 @@ new dokploy.Domain("api", {
|
|||||||
|
|
||||||
## Installing
|
## Installing
|
||||||
|
|
||||||
The SDKs are published per language; the plugin binary is resolved
|
The SDKs live in this Gitea instance's package registries, and the plugin
|
||||||
automatically from this repository's GitHub releases.
|
binary is resolved automatically from this repository's Gitea releases — the
|
||||||
|
download URL is baked into the schema, so `pulumi up` fetches it without any
|
||||||
|
configuration.
|
||||||
|
|
||||||
|
The SDKs do need one-time registry configuration, because none of these
|
||||||
|
package managers know about a private host by default.
|
||||||
|
|
||||||
|
**TypeScript / JavaScript**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# TypeScript / JavaScript
|
npm config set @maxvojtkov:registry \
|
||||||
|
https://gitea.coolify.vojtkov.dev/api/packages/usr_unknown/npm/
|
||||||
npm install @maxvojtkov/pulumi-dokploy
|
npm install @maxvojtkov/pulumi-dokploy
|
||||||
|
```
|
||||||
|
|
||||||
# Python
|
**Python**
|
||||||
pip install pulumi_dokploy
|
|
||||||
|
|
||||||
# Go
|
```bash
|
||||||
go get github.com/maxvojtkov/pulumi-dokploy/sdk/go/dokploy
|
pip install pulumi_dokploy \
|
||||||
|
--index-url https://gitea.coolify.vojtkov.dev/api/packages/usr_unknown/pypi/simple
|
||||||
|
```
|
||||||
|
|
||||||
# .NET
|
**.NET**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
dotnet nuget add source \
|
||||||
|
https://gitea.coolify.vojtkov.dev/api/packages/usr_unknown/nuget/index.json \
|
||||||
|
--name gitea-dokploy
|
||||||
dotnet add package Maxvojtkov.Dokploy
|
dotnet add package Maxvojtkov.Dokploy
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Go** — the module path stays `github.com/maxvojtkov/...` even though nothing
|
||||||
|
is hosted on GitHub, so point the proxy at Gitea and skip the public checksum
|
||||||
|
database for that path:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export GOPROXY=https://gitea.coolify.vojtkov.dev/api/packages/usr_unknown/go,direct
|
||||||
|
export GONOSUMDB='github.com/maxvojtkov/*'
|
||||||
|
go get github.com/maxvojtkov/pulumi-dokploy/sdk/go/dokploy
|
||||||
|
```
|
||||||
|
|
||||||
|
If the registries are private, add credentials the usual way for each tool —
|
||||||
|
an `_authToken` in `.npmrc`, `--extra-index-url` with basic auth for pip, and
|
||||||
|
`--username`/`--password` on the `dotnet nuget add source`.
|
||||||
|
|
||||||
Before the first release, build and install it locally instead:
|
Before the first release, build and install it locally instead:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -123,6 +153,30 @@ pulumi config set --secret dokploy:apiKey "$DOKPLOY_API_KEY"
|
|||||||
Data sources: `getProject`, `getProjects`, `getEnvironment`, `getApplication`,
|
Data sources: `getProject`, `getProjects`, `getEnvironment`, `getApplication`,
|
||||||
`getServers`.
|
`getServers`.
|
||||||
|
|
||||||
|
## Deploying from CI
|
||||||
|
|
||||||
|
Like the Terraform provider, this one manages *configuration*, not *rollouts*.
|
||||||
|
Creating an `Application` writes its definition; it does not build or start
|
||||||
|
anything.
|
||||||
|
|
||||||
|
[`dokploy-deploy-action`](https://gitea.coolify.vojtkov.dev/usr_unknown/dokploy-deploy-action)
|
||||||
|
covers the other half on GitHub Actions and Gitea Actions: it triggers a
|
||||||
|
deployment, waits for the build, and fails the job when the deployment fails.
|
||||||
|
Export the application id from your stack and hand it over.
|
||||||
|
|
||||||
|
```ts
|
||||||
|
export const apiApplicationId = api.id;
|
||||||
|
```
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- uses: https://gitea.coolify.vojtkov.dev/usr_unknown/dokploy-deploy-action@v1
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.DOKPLOY_HOST }}
|
||||||
|
api-key: ${{ secrets.DOKPLOY_API_KEY }}
|
||||||
|
application-id: ${{ steps.stack.outputs.apiApplicationId }}
|
||||||
|
docker-image: ghcr.io/acme/api:${{ github.sha }}
|
||||||
|
```
|
||||||
|
|
||||||
## Differences from the Terraform provider
|
## Differences from the Terraform provider
|
||||||
|
|
||||||
Everything is a mechanical translation of the Terraform provider, with three
|
Everything is a mechanical translation of the Terraform provider, with three
|
||||||
@@ -138,7 +192,7 @@ Pulumi conventions applied on top:
|
|||||||
instead — see [`examples/typescript/webService.ts`](examples/typescript/webService.ts),
|
instead — see [`examples/typescript/webService.ts`](examples/typescript/webService.ts),
|
||||||
which is a port of that module.
|
which is a port of that module.
|
||||||
|
|
||||||
The [known API quirks](https://github.com/maxvojtkov/terraform-provider-dokploy#known-api-quirks)
|
The [known API quirks](https://gitea.coolify.vojtkov.dev/usr_unknown/terraform-provider-dokploy#known-api-quirks)
|
||||||
documented upstream apply here unchanged, because it is the same code doing the
|
documented upstream apply here unchanged, because it is the same code doing the
|
||||||
work.
|
work.
|
||||||
|
|
||||||
@@ -175,11 +229,16 @@ replace github.com/maxvojtkov/terraform-provider-dokploy => ../../dokploy-terafo
|
|||||||
```
|
```
|
||||||
|
|
||||||
so the two repositories can be developed side by side. CI reproduces that
|
so the two repositories can be developed side by side. CI reproduces that
|
||||||
layout by checking the upstream provider out as a sibling directory. Once
|
layout by checking the upstream provider out as a sibling directory.
|
||||||
`terraform-provider-dokploy` is tagged on GitHub, drop the `replace` and pin a
|
|
||||||
real version instead:
|
The `replace` is load-bearing here, not just a convenience: the module path
|
||||||
|
says `github.com`, but the code lives on Gitea, and Go has no way to discover
|
||||||
|
that on its own. It can go away once the upstream provider is published to
|
||||||
|
Gitea's Go registry, at which point the module resolves through `GOPROXY`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
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 \
|
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.1.0
|
||||||
```
|
```
|
||||||
@@ -196,10 +255,20 @@ Tag the repository and the `release` workflow does the rest:
|
|||||||
git tag v0.1.0 && git push origin v0.1.0
|
git tag v0.1.0 && git push origin v0.1.0
|
||||||
```
|
```
|
||||||
|
|
||||||
It publishes plugin binaries to a GitHub release via GoReleaser, pushes the
|
GoReleaser publishes the plugin binaries to a Gitea release first — Pulumi
|
||||||
npm / PyPI / NuGet packages, and commits and tags the Go SDK as `sdk/v0.1.0`.
|
resolves the plugin from there, so it has to exist before anyone installs an
|
||||||
The workflow needs three repository secrets: `NPM_TOKEN`, `PYPI_API_TOKEN` and
|
SDK — and then the four SDKs go to this instance's npm, PyPI, NuGet and Go
|
||||||
`NUGET_PUBLISH_KEY`.
|
registries.
|
||||||
|
|
||||||
|
**No secrets to configure.** Every step authenticates with `secrets.GITEA_TOKEN`,
|
||||||
|
which Gitea injects into each run automatically.
|
||||||
|
|
||||||
|
Two things the workflow depends on:
|
||||||
|
|
||||||
|
- A registered `act_runner` with an `ubuntu-latest` label, and enough of a
|
||||||
|
toolchain for Go, Node, Python and .NET.
|
||||||
|
- The upstream `terraform-provider-dokploy` repository being readable by that
|
||||||
|
token, since the `replace` directive needs it checked out as a sibling.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
2
sdk/python/pulumi_dokploy/README.md
generated
2
sdk/python/pulumi_dokploy/README.md
generated
@@ -1,4 +1,4 @@
|
|||||||
> This provider is a derived work of the [Terraform Provider](https://github.com/maxvojtkov/terraform-provider-dokploy)
|
> This provider is a derived work of the [Terraform Provider](https://github.com/maxvojtkov/terraform-provider-dokploy)
|
||||||
> distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,
|
> distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,
|
||||||
> first check the [`pulumi-dokploy` repo](https://github.com/maxvojtkov/pulumi-dokploy/issues); however, if that doesn't turn up anything,
|
> first check the [`pulumi-dokploy` repo](https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/issues); however, if that doesn't turn up anything,
|
||||||
> please consult the source [`terraform-provider-dokploy` repo](https://github.com/maxvojtkov/terraform-provider-dokploy/issues).
|
> please consult the source [`terraform-provider-dokploy` repo](https://github.com/maxvojtkov/terraform-provider-dokploy/issues).
|
||||||
2
sdk/python/pulumi_dokploy/_utilities.py
generated
2
sdk/python/pulumi_dokploy/_utilities.py
generated
@@ -322,7 +322,7 @@ def deprecated(message: str) -> typing.Callable[[C], C]:
|
|||||||
return decorator
|
return decorator
|
||||||
|
|
||||||
def get_plugin_download_url():
|
def get_plugin_download_url():
|
||||||
return "github://api.github.com/maxvojtkov/pulumi-dokploy"
|
return "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}"
|
||||||
|
|
||||||
def get_version():
|
def get_version():
|
||||||
return _version_str
|
return _version_str
|
||||||
|
|||||||
2
sdk/python/pulumi_dokploy/pulumi-plugin.json
generated
2
sdk/python/pulumi_dokploy/pulumi-plugin.json
generated
@@ -2,5 +2,5 @@
|
|||||||
"resource": true,
|
"resource": true,
|
||||||
"name": "dokploy",
|
"name": "dokploy",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"server": "github://api.github.com/maxvojtkov/pulumi-dokploy"
|
"server": "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}"
|
||||||
}
|
}
|
||||||
|
|||||||
4
sdk/python/pyproject.toml
generated
4
sdk/python/pyproject.toml
generated
@@ -9,8 +9,8 @@
|
|||||||
[project.license]
|
[project.license]
|
||||||
text = "MPL-2.0"
|
text = "MPL-2.0"
|
||||||
[project.urls]
|
[project.urls]
|
||||||
Homepage = "https://github.com/maxvojtkov/pulumi-dokploy"
|
Homepage = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy"
|
||||||
Repository = "https://github.com/maxvojtkov/pulumi-dokploy"
|
Repository = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["setuptools>=61.0"]
|
requires = ["setuptools>=61.0"]
|
||||||
|
|||||||
Reference in New Issue
Block a user