diff --git a/apps/dokploy/templates/templates.ts b/apps/dokploy/templates/templates.ts index 06653ab2c..5ed07e207 100644 --- a/apps/dokploy/templates/templates.ts +++ b/apps/dokploy/templates/templates.ts @@ -427,7 +427,8 @@ export const templates: TemplateData[] = [ id: "zipline", name: "Zipline", 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", links: { github: "https://github.com/diced/zipline", @@ -437,7 +438,7 @@ export const templates: TemplateData[] = [ tags: ["media system", "storage"], load: () => import("./zipline/index").then((m) => m.generate), }, -{ + { id: "soketi", name: "Soketi", version: "v1.4-16", diff --git a/apps/dokploy/templates/zipline/docker-compose.yml b/apps/dokploy/templates/zipline/docker-compose.yml index 4956546ce..808b0b89a 100644 --- a/apps/dokploy/templates/zipline/docker-compose.yml +++ b/apps/dokploy/templates/zipline/docker-compose.yml @@ -1,4 +1,4 @@ -version: '3' +version: "3" services: postgres: image: postgres:15 @@ -12,21 +12,13 @@ services: volumes: - pg_data:/var/lib/postgresql/data healthcheck: - test: ['CMD-SHELL', 'pg_isready -U postgres'] + test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 10s timeout: 5s retries: 5 zipline: - image: ghcr.io/diced/zipline - 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} + image: ghcr.io/diced/zipline:3.7.9 restart: unless-stopped environment: - CORE_RETURN_HTTPS=${ZIPLINE_RETURN_HTTPS} @@ -36,14 +28,10 @@ services: - CORE_DATABASE_URL=postgres://postgres:postgres@postgres/postgres - CORE_LOGGER=${ZIPLINE_LOGGER} volumes: - - '../files/uploads:/zipline/uploads' - - '../files/public:/zipline/public' + - "../files/uploads:/zipline/uploads" + - "../files/public:/zipline/public" depends_on: - - 'postgres' + - "postgres" volumes: pg_data: - -networks: - dokploy-network: - external: true \ No newline at end of file diff --git a/apps/dokploy/templates/zipline/index.ts b/apps/dokploy/templates/zipline/index.ts index 774b9bbf0..ce0172e4e 100644 --- a/apps/dokploy/templates/zipline/index.ts +++ b/apps/dokploy/templates/zipline/index.ts @@ -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 { - const mainServiceHash = generateHash(schema.projectName); - const randomDomain = generateRandomDomain(schema); - const secretBase = generateBase64(64); + const randomDomain = generateRandomDomain(schema); + const secretBase = generateBase64(64); - const envs = [ - `ZIPLINE_HOST=${randomDomain}`, - `ZIPLINE_PORT=3000`, - `ZIPLINE_SECRET=${secretBase}`, - `ZIPLINE_RETURN_HTTPS=false`, - `ZIPLINE_LOGGER=true`, - `HASH=${mainServiceHash}` - ] + const domains: DomainSchema[] = [ + { + host: randomDomain, + port: 3000, + serviceName: "zipline", + }, + ]; - return { - envs - } -} \ No newline at end of file + const envs = [ + "ZIPLINE_PORT=3000", + `ZIPLINE_SECRET=${secretBase}`, + "ZIPLINE_RETURN_HTTPS=false", + "ZIPLINE_LOGGER=true", + ]; + + return { + envs, + domains, + }; +}