mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor(templates): add zipline domains
This commit is contained in:
@@ -427,7 +427,8 @@ export const templates: TemplateData[] = [
|
|||||||
id: "zipline",
|
id: "zipline",
|
||||||
name: "Zipline",
|
name: "Zipline",
|
||||||
version: "v3.7.9",
|
version: "v3.7.9",
|
||||||
description: "A ShareX/file upload server that is easy to use, packed with features, and with an easy setup!",
|
description:
|
||||||
|
"A ShareX/file upload server that is easy to use, packed with features, and with an easy setup!",
|
||||||
logo: "zipline.png",
|
logo: "zipline.png",
|
||||||
links: {
|
links: {
|
||||||
github: "https://github.com/diced/zipline",
|
github: "https://github.com/diced/zipline",
|
||||||
@@ -437,7 +438,7 @@ export const templates: TemplateData[] = [
|
|||||||
tags: ["media system", "storage"],
|
tags: ["media system", "storage"],
|
||||||
load: () => import("./zipline/index").then((m) => m.generate),
|
load: () => import("./zipline/index").then((m) => m.generate),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "soketi",
|
id: "soketi",
|
||||||
name: "Soketi",
|
name: "Soketi",
|
||||||
version: "v1.4-16",
|
version: "v1.4-16",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: '3'
|
version: "3"
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:15
|
image: postgres:15
|
||||||
@@ -12,21 +12,13 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- pg_data:/var/lib/postgresql/data
|
- pg_data:/var/lib/postgresql/data
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD-SHELL', 'pg_isready -U postgres']
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
|
|
||||||
zipline:
|
zipline:
|
||||||
image: ghcr.io/diced/zipline
|
image: ghcr.io/diced/zipline:3.7.9
|
||||||
networks:
|
|
||||||
- dokploy-network
|
|
||||||
ports:
|
|
||||||
- ${ZIPLINE_PORT}
|
|
||||||
labels:
|
|
||||||
- traefik.enable=true
|
|
||||||
- traefik.http.routers.${HASH}.rule=Host(`${ZIPLINE_HOST}`)
|
|
||||||
- traefik.http.services.${HASH}.loadbalancer.server.port=${ZIPLINE_PORT}
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- CORE_RETURN_HTTPS=${ZIPLINE_RETURN_HTTPS}
|
- CORE_RETURN_HTTPS=${ZIPLINE_RETURN_HTTPS}
|
||||||
@@ -36,14 +28,10 @@ services:
|
|||||||
- CORE_DATABASE_URL=postgres://postgres:postgres@postgres/postgres
|
- CORE_DATABASE_URL=postgres://postgres:postgres@postgres/postgres
|
||||||
- CORE_LOGGER=${ZIPLINE_LOGGER}
|
- CORE_LOGGER=${ZIPLINE_LOGGER}
|
||||||
volumes:
|
volumes:
|
||||||
- '../files/uploads:/zipline/uploads'
|
- "../files/uploads:/zipline/uploads"
|
||||||
- '../files/public:/zipline/public'
|
- "../files/public:/zipline/public"
|
||||||
depends_on:
|
depends_on:
|
||||||
- 'postgres'
|
- "postgres"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
pg_data:
|
pg_data:
|
||||||
|
|
||||||
networks:
|
|
||||||
dokploy-network:
|
|
||||||
external: true
|
|
||||||
@@ -1,20 +1,32 @@
|
|||||||
import { generateBase64, generateHash, generateRandomDomain, type Schema, type Template } from "@/templates/utils"
|
import {
|
||||||
|
type DomainSchema,
|
||||||
|
type Schema,
|
||||||
|
type Template,
|
||||||
|
generateBase64,
|
||||||
|
generateRandomDomain,
|
||||||
|
} from "@/templates/utils";
|
||||||
|
|
||||||
export function generate(schema: Schema): Template {
|
export function generate(schema: Schema): Template {
|
||||||
const mainServiceHash = generateHash(schema.projectName);
|
const randomDomain = generateRandomDomain(schema);
|
||||||
const randomDomain = generateRandomDomain(schema);
|
const secretBase = generateBase64(64);
|
||||||
const secretBase = generateBase64(64);
|
|
||||||
|
|
||||||
const envs = [
|
const domains: DomainSchema[] = [
|
||||||
`ZIPLINE_HOST=${randomDomain}`,
|
{
|
||||||
`ZIPLINE_PORT=3000`,
|
host: randomDomain,
|
||||||
`ZIPLINE_SECRET=${secretBase}`,
|
port: 3000,
|
||||||
`ZIPLINE_RETURN_HTTPS=false`,
|
serviceName: "zipline",
|
||||||
`ZIPLINE_LOGGER=true`,
|
},
|
||||||
`HASH=${mainServiceHash}`
|
];
|
||||||
]
|
|
||||||
|
|
||||||
return {
|
const envs = [
|
||||||
envs
|
"ZIPLINE_PORT=3000",
|
||||||
}
|
`ZIPLINE_SECRET=${secretBase}`,
|
||||||
}
|
"ZIPLINE_RETURN_HTTPS=false",
|
||||||
|
"ZIPLINE_LOGGER=true",
|
||||||
|
];
|
||||||
|
|
||||||
|
return {
|
||||||
|
envs,
|
||||||
|
domains,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user