mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Merge pull request #1329 from drudge/templates/registry
feat(template): add docker registry template
This commit is contained in:
commit
b1502f5f82
BIN
apps/dokploy/public/templates/outline.png
Normal file
BIN
apps/dokploy/public/templates/outline.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
@ -1 +0,0 @@
|
||||
<svg fill="#000" width="32" height="32" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"><path d="M32,57.6 L32,59.1606101 C32,61.3697491 30.209139,63.1606101 28,63.1606101 C27.3130526,63.1606101 26.6376816,62.9836959 26.038955,62.6469122 L2.03895504,49.1469122 C0.779447116,48.438439 -4.3614532e-15,47.1057033 -7.10542736e-15,45.6606101 L-7.10542736e-15,18.3393899 C-7.28240024e-15,16.8942967 0.779447116,15.561561 2.03895504,14.8530878 L26.038955,1.35308779 C27.9643866,0.270032565 30.4032469,0.952913469 31.4863021,2.87834498 C31.8230858,3.47707155 32,4.15244252 32,4.83938994 L32,6.4 L34.8506085,5.54481746 C36.9665799,4.91002604 39.1965137,6.11075966 39.8313051,8.22673106 C39.9431692,8.59961116 40,8.98682435 40,9.3761226 L40,11 L43.5038611,10.5620174 C45.6959408,10.2880074 47.6951015,11.8429102 47.9691115,14.0349899 C47.9896839,14.1995692 48,14.3652688 48,14.5311289 L48,49.4688711 C48,51.6780101 46.209139,53.4688711 44,53.4688711 C43.8341399,53.4688711 43.6684404,53.458555 43.5038611,53.4379826 L40,53 L40,54.6238774 C40,56.8330164 38.209139,58.6238774 36,58.6238774 C35.6107017,58.6238774 35.2234886,58.5670466 34.8506085,58.4551825 L32,57.6 Z M32,53.4238774 L36,54.6238774 L36,9.3761226 L32,10.5761226 L32,53.4238774 Z M40,15.0311289 L40,48.9688711 L44,49.4688711 L44,14.5311289 L40,15.0311289 Z M5.32907052e-15,44.4688711 L5.32907052e-15,19.5311289 L3.55271368e-15,44.4688711 Z M4,18.3393899 L4,45.6606101 L28,59.1606101 L28,4.83938994 L4,18.3393899 Z M8,21 L12,19 L12,45 L8,43 L8,21 Z"></path></svg>
|
Before Width: | Height: | Size: 1.5 KiB |
BIN
apps/dokploy/public/templates/registry.png
Normal file
BIN
apps/dokploy/public/templates/registry.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
@ -1,6 +1,6 @@
|
||||
services:
|
||||
outline:
|
||||
image: outlinewiki/outline:0.81.0
|
||||
image: outlinewiki/outline:0.82.0
|
||||
restart: always
|
||||
depends_on:
|
||||
- postgres
|
||||
|
19
apps/dokploy/templates/registry/docker-compose.yml
Normal file
19
apps/dokploy/templates/registry/docker-compose.yml
Normal file
@ -0,0 +1,19 @@
|
||||
services:
|
||||
registry:
|
||||
restart: always
|
||||
image: registry:2
|
||||
ports:
|
||||
- 5000
|
||||
volumes:
|
||||
- ../files/auth/registry.password:/auth/registry.password
|
||||
- registry-data:/var/lib/registry
|
||||
environment:
|
||||
REGISTRY_STORAGE_DELETE_ENABLED: true
|
||||
REGISTRY_HEALTH_STORAGEDRIVER_ENABLED: false
|
||||
REGISTRY_HTTP_SECRET: ${REGISTRY_HTTP_SECRET}
|
||||
REGISTRY_AUTH: htpasswd
|
||||
REGISTRY_AUTH_HTPASSWD_REALM: Registry Realm
|
||||
REGISTRY_AUTH_HTPASSWD_PATH: /auth/registry.password
|
||||
|
||||
volumes:
|
||||
registry-data:
|
35
apps/dokploy/templates/registry/index.ts
Normal file
35
apps/dokploy/templates/registry/index.ts
Normal file
@ -0,0 +1,35 @@
|
||||
import {
|
||||
type DomainSchema,
|
||||
type Schema,
|
||||
type Template,
|
||||
generatePassword,
|
||||
generateRandomDomain,
|
||||
} from "../utils";
|
||||
|
||||
export function generate(schema: Schema): Template {
|
||||
const domains: DomainSchema[] = [
|
||||
{
|
||||
host: generateRandomDomain(schema),
|
||||
port: 5000,
|
||||
serviceName: "registry",
|
||||
},
|
||||
];
|
||||
|
||||
const registryHttpSecret = generatePassword(30);
|
||||
|
||||
const envs = [`REGISTRY_HTTP_SECRET=${registryHttpSecret}`];
|
||||
|
||||
const mounts: Template["mounts"] = [
|
||||
{
|
||||
filePath: "/auth/registry.password",
|
||||
content:
|
||||
"# from: docker run --rm --entrypoint htpasswd httpd:2 -Bbn docker password\ndocker:$2y$10$qWZoWev/u5PV7WneFoRAMuoGpRcAQOgUuIIdLnU7pJXogrBSY23/2\n",
|
||||
},
|
||||
];
|
||||
|
||||
return {
|
||||
domains,
|
||||
envs,
|
||||
mounts,
|
||||
};
|
||||
}
|
@ -20,7 +20,7 @@ export const templates: TemplateData[] = [
|
||||
{
|
||||
id: "outline",
|
||||
name: "Outline",
|
||||
version: "0.81.0",
|
||||
version: "0.82.0",
|
||||
description:
|
||||
"Outline is a self-hosted knowledge base and documentation platform that allows you to build and manage your own knowledge base applications.",
|
||||
links: {
|
||||
@ -28,7 +28,7 @@ export const templates: TemplateData[] = [
|
||||
website: "https://outline.com/",
|
||||
docs: "https://docs.outline.com/",
|
||||
},
|
||||
logo: "outline.svg",
|
||||
logo: "outline.png",
|
||||
load: () => import("./outline/index").then((m) => m.generate),
|
||||
tags: ["documentation", "knowledge-base", "self-hosted"],
|
||||
},
|
||||
@ -1439,6 +1439,21 @@ export const templates: TemplateData[] = [
|
||||
tags: ["file-manager", "vdfs", "storage"],
|
||||
load: () => import("./spacedrive/index").then((m) => m.generate),
|
||||
},
|
||||
{
|
||||
id: "registry",
|
||||
name: "Docker Registry",
|
||||
version: "2",
|
||||
description:
|
||||
"Distribution implementation for storing and distributing of Docker container images and artifacts.",
|
||||
links: {
|
||||
github: "https://github.com/distribution/distribution",
|
||||
website: "https://hub.docker.com/_/registry",
|
||||
docs: "https://distribution.github.io/distribution/",
|
||||
},
|
||||
logo: "registry.png",
|
||||
tags: ["registry", "docker", "self-hosted"],
|
||||
load: () => import("./registry/index").then((m) => m.generate),
|
||||
},
|
||||
{
|
||||
id: "alist",
|
||||
name: "AList",
|
||||
|
Loading…
Reference in New Issue
Block a user