Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(template): added cloudflared #1104

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions apps/dokploy/public/templates/cloudflared.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions apps/dokploy/templates/cloudflared/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
services:
cloudflared:
image: 'cloudflare/cloudflared:latest'
environment:
# Don't forget to set this in your Dokploy Environment
- 'TUNNEL_TOKEN=${CLOUDFLARE_TUNNEL_TOKEN}'
network_mode: host
restart: unless-stopped
command: [
"tunnel",

# More tunnel run parameters here:
# https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/configure-tunnels/tunnel-run-parameters/
"--no-autoupdate",
#"--protocol", "http2",

"run"
]
9 changes: 9 additions & 0 deletions apps/dokploy/templates/cloudflared/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { Schema, Template } from "../utils";

export function generate(schema: Schema): Template {
const envs = [`CLOUDFLARE_TUNNEL_TOKEN="<INSERT TOKEN>"`];

return {
envs,
};
}
16 changes: 16 additions & 0 deletions apps/dokploy/templates/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1239,4 +1239,20 @@ export const templates: TemplateData[] = [
tags: ["matrix", "communication"],
load: () => import("./conduit/index").then((m) => m.generate),
},
{
id: "cloudflared",
name: "Cloudflared",
version: "latest",
description:
"A lightweight daemon that securely connects local services to the internet through Cloudflare Tunnel.",
logo: "cloudflared.svg",
links: {
github: "https://github.com/cloudflare/cloudflared",
website:
"https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/",
docs: "https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/",
},
tags: ["cloud", "networking", "security", "tunnel"],
load: () => import("./cloudflared/index").then((m) => m.generate),
},
];
Loading