migrate
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
services:
|
||||
<< service_name >>:
|
||||
image: docker.io/twingate/connector:1.88.0
|
||||
hostname: << container_hostname >>
|
||||
environment:
|
||||
- TZ=<< container_timezone >>
|
||||
- TWINGATE_NETWORK=<< twingate_network >>
|
||||
- TWINGATE_ACCESS_TOKEN=<< twingate_access_token >>
|
||||
- TWINGATE_REFRESH_TOKEN=<< twingate_refresh_token >>
|
||||
- TWINGATE_LOG_ANALYTICS=v2
|
||||
- TWINGATE_LOG_LEVEL=<< twingate_log_level >>
|
||||
<%- if twingate_dns %>
|
||||
- TWINGATE_DNS=<< twingate_dns >>
|
||||
<%- endif %>
|
||||
sysctls:
|
||||
net.ipv4.ping_group_range: "0 2147483647"
|
||||
deploy:
|
||||
<%- if swarm_placement_mode == 'replicated' %>
|
||||
mode: replicated
|
||||
replicas: << swarm_replicas >>
|
||||
<%- if swarm_placement_host %>
|
||||
placement:
|
||||
constraints:
|
||||
- node.hostname == << swarm_placement_host >>
|
||||
<%- endif %>
|
||||
<%- else %>
|
||||
mode: global
|
||||
<%- endif %>
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
<%- if resources_enabled %>
|
||||
resources:
|
||||
limits:
|
||||
cpus: '<< resources_cpu_limit >>'
|
||||
memory: << resources_memory_limit >>
|
||||
reservations:
|
||||
cpus: '<< resources_cpu_reservation >>'
|
||||
memory: << resources_memory_reservation >>
|
||||
<%- endif %>
|
||||
@@ -0,0 +1,206 @@
|
||||
{
|
||||
"slug": "twingate-connector",
|
||||
"kind": "swarm",
|
||||
"metadata": {
|
||||
"name": "Twingate_Connector",
|
||||
"description": "Lightweight agent that establishes secure zero-trust connections between your private network and the Twingate service, allowing authorized users to access internal resources without a VPN.",
|
||||
"tags": [],
|
||||
"icon": {
|
||||
"provider": "selfhst",
|
||||
"id": "twingate"
|
||||
},
|
||||
"draft": false,
|
||||
"version": {
|
||||
"name": "1.88.0",
|
||||
"source_dep_name": "docker.io/twingate/connector",
|
||||
"source_dep_version": "1.88.0"
|
||||
}
|
||||
},
|
||||
"variables": [
|
||||
{
|
||||
"title": "General",
|
||||
"name": "general",
|
||||
"items": [
|
||||
{
|
||||
"name": "service_name",
|
||||
"type": "str",
|
||||
"title": "Service Name",
|
||||
"required": false,
|
||||
"default": "twingate",
|
||||
"config": {
|
||||
"placeholder": "twingate"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "container_hostname",
|
||||
"type": "str",
|
||||
"title": "Container Hostname",
|
||||
"required": false,
|
||||
"default": "twingate-connector",
|
||||
"config": {
|
||||
"placeholder": "twingate-connector"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "container_timezone",
|
||||
"type": "str",
|
||||
"title": "Container Timezone",
|
||||
"required": true,
|
||||
"config": {
|
||||
"placeholder": "Europe/Berlin"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "swarm_placement_mode",
|
||||
"type": "enum",
|
||||
"title": "Swarm Placement Mode",
|
||||
"required": true,
|
||||
"default": "replicated",
|
||||
"config": {
|
||||
"options": [
|
||||
"replicated",
|
||||
"global"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "swarm_replicas",
|
||||
"type": "int",
|
||||
"title": "Swarm Replicas",
|
||||
"required": false,
|
||||
"default": 1,
|
||||
"config": {
|
||||
"slider": true,
|
||||
"min": 1,
|
||||
"max": 10,
|
||||
"step": 1,
|
||||
"placeholder": "1",
|
||||
"unit": "replicas"
|
||||
},
|
||||
"needs": [
|
||||
"swarm_placement_mode=replicated"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "swarm_placement_host",
|
||||
"type": "str",
|
||||
"title": "Swarm Placement Host",
|
||||
"required": false,
|
||||
"default": "",
|
||||
"needs": [
|
||||
"swarm_placement_mode=replicated"
|
||||
],
|
||||
"config": {
|
||||
"placeholder": "swarm-node-1"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Twingate Configuration",
|
||||
"name": "twingate",
|
||||
"items": [
|
||||
{
|
||||
"name": "twingate_network",
|
||||
"type": "str",
|
||||
"title": "Network Name",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "twingate_access_token",
|
||||
"type": "secret",
|
||||
"title": "Access Token",
|
||||
"required": true,
|
||||
"description": "Connector access token from Twingate."
|
||||
},
|
||||
{
|
||||
"name": "twingate_refresh_token",
|
||||
"type": "secret",
|
||||
"title": "Refresh Token",
|
||||
"required": true,
|
||||
"description": "Connector refresh token from Twingate."
|
||||
},
|
||||
{
|
||||
"name": "twingate_log_level",
|
||||
"type": "int",
|
||||
"title": "Log Level",
|
||||
"required": false,
|
||||
"default": 1,
|
||||
"description": "Log level (1=ERROR, 2=WARN, 3=INFO, 4=DEBUG)",
|
||||
"config": {
|
||||
"slider": true,
|
||||
"min": 1,
|
||||
"max": 4,
|
||||
"step": 1,
|
||||
"placeholder": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "twingate_dns",
|
||||
"type": "str",
|
||||
"title": "DNS Server",
|
||||
"required": false,
|
||||
"default": "",
|
||||
"description": "Local DNS server IP (optional, leave empty to use default)",
|
||||
"config": {
|
||||
"placeholder": "192.0.2.53"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Resource Limits",
|
||||
"name": "resources",
|
||||
"toggle": "resources_enabled",
|
||||
"items": [
|
||||
{
|
||||
"name": "resources_enabled",
|
||||
"type": "bool",
|
||||
"title": "Resources Enabled",
|
||||
"required": false,
|
||||
"default": false
|
||||
},
|
||||
{
|
||||
"name": "resources_cpu_limit",
|
||||
"type": "str",
|
||||
"title": "Resources Cpu Limit",
|
||||
"required": true,
|
||||
"default": 1,
|
||||
"config": {
|
||||
"placeholder": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "resources_cpu_reservation",
|
||||
"type": "str",
|
||||
"title": "Resources Cpu Reservation",
|
||||
"required": true,
|
||||
"default": 0.25,
|
||||
"config": {
|
||||
"placeholder": "0.25"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "resources_memory_limit",
|
||||
"type": "str",
|
||||
"title": "Resources Memory Limit",
|
||||
"required": true,
|
||||
"default": "1G",
|
||||
"config": {
|
||||
"placeholder": "1G"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "resources_memory_reservation",
|
||||
"type": "str",
|
||||
"title": "Resources Memory Reservation",
|
||||
"required": true,
|
||||
"default": "512M",
|
||||
"config": {
|
||||
"placeholder": "512M"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user