diff --git a/apps/dokploy/public/templates/zipline.png b/apps/dokploy/public/templates/zipline.png new file mode 100644 index 000000000..2b8f6972d Binary files /dev/null and b/apps/dokploy/public/templates/zipline.png differ diff --git a/apps/dokploy/templates/templates.ts b/apps/dokploy/templates/templates.ts index 6e4867ba9..265d0f0de 100644 --- a/apps/dokploy/templates/templates.ts +++ b/apps/dokploy/templates/templates.ts @@ -408,4 +408,18 @@ export const templates: TemplateData[] = [ tags: ["database", "spreadsheet", "low-code", "nocode"], load: () => import("./teable/index").then((m) => m.generate), }, + { + 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!", + logo: "zipline.png", + links: { + github: "https://github.com/diced/zipline", + website: "https://zipline.diced.sh/", + docs: "https://zipline.diced.sh/docs/", + }, + tags: ["media system", "storage"], + load: () => import("./zipline/index").then((m) => m.generate), + } ]; diff --git a/apps/dokploy/templates/zipline/docker-compose.yml b/apps/dokploy/templates/zipline/docker-compose.yml new file mode 100644 index 000000000..451fa9626 --- /dev/null +++ b/apps/dokploy/templates/zipline/docker-compose.yml @@ -0,0 +1,49 @@ +version: '3' +services: + postgres: + image: postgres:15 + networks: + - dokploy-network + restart: unless-stopped + environment: + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD=postgres + - POSTGRES_DATABASE=postgres + volumes: + - pg_data:/var/lib/postgresql/data + healthcheck: + 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} + restart: unless-stopped + environment: + - CORE_RETURN_HTTPS=false + - CORE_SECRET=${ZIPLINE_SECRET} + - CORE_HOST=0.0.0.0 + - CORE_PORT=3000 + - CORE_DATABASE_URL=postgres://postgres:postgres@postgres/postgres + - CORE_LOGGER=true + volumes: + - './uploads:/zipline/uploads' + - './public:/zipline/public' + depends_on: + - '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 new file mode 100644 index 000000000..24e16ec99 --- /dev/null +++ b/apps/dokploy/templates/zipline/index.ts @@ -0,0 +1,18 @@ +import { generateBase64, generateHash, generateRandomDomain, type Schema, type Template } from "@/templates/utils" + +export function generate(schema: Schema): Template { + const mainServiceHash = generateHash(schema.projectName); + const randomDomain = generateRandomDomain(schema); + const secretBase = generateBase64(64); + + const envs = [ + `ZIPLINE_HOST=${randomDomain}`, + `ZIPLINE_PORT=3000`, + `ZIPLINE_SECRET=${secretBase}`, + `HASH=${mainServiceHash}`, + ] + + return { + envs + } +} \ No newline at end of file