mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat(template): add docker registry template
This commit is contained in:
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 |
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,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1439,6 +1439,21 @@ export const templates: TemplateData[] = [
|
|||||||
tags: ["file-manager", "vdfs", "storage"],
|
tags: ["file-manager", "vdfs", "storage"],
|
||||||
load: () => import("./spacedrive/index").then((m) => m.generate),
|
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",
|
id: "alist",
|
||||||
name: "AList",
|
name: "AList",
|
||||||
|
|||||||
Reference in New Issue
Block a user