diff --git a/messages/en-US.json b/messages/en-US.json index aa9cb2b0..68f9640b 100644 --- a/messages/en-US.json +++ b/messages/en-US.json @@ -2060,7 +2060,7 @@ "machineClientsBannerDescription": "Machine clients are for servers and automated systems that are not associated with a specific user. They authenticate with an ID and secret, and can run with Pangolin CLI, Olm CLI, or Olm as a container.", "machineClientsBannerPangolinCLI": "Pangolin CLI", "machineClientsBannerOlmCLI": "Olm CLI", - "machineClientsBannerOlmContainer": "Olm Container", + "machineClientsBannerOlmContainer": "Container", "clientsTableUserClients": "User", "clientsTableMachineClients": "Machine", "licenseTableValidUntil": "Valid Until", diff --git a/src/components/newt-install-commands.tsx b/src/components/newt-install-commands.tsx index b814fdae..3561cd6b 100644 --- a/src/components/newt-install-commands.tsx +++ b/src/components/newt-install-commands.tsx @@ -18,11 +18,11 @@ export type CommandItem = string | { title: string; command: string }; const PLATFORMS = [ "unix", - "windows", "docker", "kubernetes", "podman", - "nixos" + "nixos", + "windows" ] as const; type Platform = (typeof PLATFORMS)[number]; diff --git a/src/components/olm-install-commands.tsx b/src/components/olm-install-commands.tsx index 5418c8b9..9ff9970f 100644 --- a/src/components/olm-install-commands.tsx +++ b/src/components/olm-install-commands.tsx @@ -14,7 +14,7 @@ import { Button } from "./ui/button"; export type CommandItem = string | { title: string; command: string }; -const PLATFORMS = ["unix", "windows", "docker"] as const; +const PLATFORMS = ["unix", "docker", "windows"] as const; type Platform = (typeof PLATFORMS)[number]; @@ -51,6 +51,27 @@ export function OlmInstallCommands({ } ] }, + docker: { + "Docker Compose": [ + `services: + pangolin-cli: + image: fosrl/pangolin-cli + container_name: pangolin-cli + restart: unless-stopped + network_mode: host + cap_add: + - NET_ADMIN + devices: + - /dev/net/tun:/dev/net/tun + environment: + - PANGOLIN_ENDPOINT=${endpoint} + - CLIENT_ID=${id} + - CLIENT_SECRET=${secret}` + ], + "Docker Run": [ + `docker run -dit --network host --cap-add NET_ADMIN --device /dev/net/tun:/dev/net/tun fosrl/pangolin-cli up client --id ${id} --secret ${secret} --endpoint ${endpoint} --attach` + ] + }, windows: { x64: [ { @@ -63,27 +84,6 @@ export function OlmInstallCommands({ command: `olm.exe --id ${id} --secret ${secret} --endpoint ${endpoint}` } ] - }, - docker: { - "Docker Compose": [ - `services: - olm: - image: fosrl/olm - container_name: olm - restart: unless-stopped - network_mode: host - cap_add: - - NET_ADMIN - devices: - - /dev/net/tun:/dev/net/tun - environment: - - PANGOLIN_ENDPOINT=${endpoint} - - OLM_ID=${id} - - OLM_SECRET=${secret}` - ], - "Docker Run": [ - `docker run -dit --network host --cap-add NET_ADMIN --device /dev/net/tun:/dev/net/tun fosrl/olm --id ${id} --secret ${secret} --endpoint ${endpoint}` - ] } };