From f3be56234bb0343301275c640b19a4346a94bcbe Mon Sep 17 00:00:00 2001 From: DrMxrcy Date: Thu, 21 Nov 2024 01:52:39 -0500 Subject: [PATCH 1/6] fix(template): Peppermint Naming --- .../templates/peppermint/docker-compose.yml | 16 ++++++++++------ apps/dokploy/templates/peppermint/index.ts | 7 ++----- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/apps/dokploy/templates/peppermint/docker-compose.yml b/apps/dokploy/templates/peppermint/docker-compose.yml index a20bedf4..305c5eb9 100644 --- a/apps/dokploy/templates/peppermint/docker-compose.yml +++ b/apps/dokploy/templates/peppermint/docker-compose.yml @@ -1,13 +1,13 @@ version: "3.8" services: - peppermint_postgres: + peppermint-postgres: image: postgres:latest restart: always networks: - dokploy-network volumes: - - pgdata:/var/lib/postgresql/data + - peppermint-postgres-data:/var/lib/postgresql/data environment: POSTGRES_USER: peppermint POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} @@ -18,19 +18,23 @@ services: timeout: 5s retries: 5 - peppermint: + peppermint-app: image: pepperlabs/peppermint:latest restart: always networks: - dokploy-network depends_on: - peppermint_postgres: + peppermint-postgres: condition: service_healthy environment: DB_USERNAME: "peppermint" DB_PASSWORD: ${POSTGRES_PASSWORD} - DB_HOST: "peppermint_postgres" + DB_HOST: "peppermint-postgres" SECRET: ${SECRET} +networks: + dokploy-network: + external: true + volumes: - pgdata: \ No newline at end of file + peppermint-postgres-data: \ No newline at end of file diff --git a/apps/dokploy/templates/peppermint/index.ts b/apps/dokploy/templates/peppermint/index.ts index 2b71d490..de63f845 100644 --- a/apps/dokploy/templates/peppermint/index.ts +++ b/apps/dokploy/templates/peppermint/index.ts @@ -8,27 +8,24 @@ import { } from "../utils"; export function generate(schema: Schema): Template { - // Generate domains and secrets const mainDomain = generateRandomDomain(schema); const apiDomain = generateRandomDomain(schema); const postgresPassword = generatePassword(); const secret = generateBase64(32); - // Configure domain routing const domains: DomainSchema[] = [ { host: mainDomain, port: 3000, - serviceName: "peppermint", + serviceName: "peppermint-app", }, { host: apiDomain, port: 5003, - serviceName: "peppermint", + serviceName: "peppermint-app", }, ]; - // Set environment variables const envs = [ `MAIN_DOMAIN=${mainDomain}`, `API_DOMAIN=${apiDomain}`, From 55ac24ee8e54ce817dc7c085e3016a2ebbaf7776 Mon Sep 17 00:00:00 2001 From: DrMxrcy Date: Thu, 21 Nov 2024 01:53:36 -0500 Subject: [PATCH 2/6] fix(template): Windmill Naming --- .../templates/windmill/docker-compose.yml | 46 ++++++++++--------- apps/dokploy/templates/windmill/index.ts | 8 ++-- 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/apps/dokploy/templates/windmill/docker-compose.yml b/apps/dokploy/templates/windmill/docker-compose.yml index 5646c47a..de91ee55 100644 --- a/apps/dokploy/templates/windmill/docker-compose.yml +++ b/apps/dokploy/templates/windmill/docker-compose.yml @@ -1,12 +1,12 @@ version: "3.8" services: - db: + windmill-postgres: image: postgres:16 shm_size: 1g restart: unless-stopped volumes: - - db_data:/var/lib/postgresql/data + - windmill-postgres-data:/var/lib/postgresql/data networks: - dokploy-network environment: @@ -18,7 +18,7 @@ services: timeout: 5s retries: 5 - windmill_server: + windmill-server: image: ghcr.io/windmill-labs/windmill:main networks: - dokploy-network @@ -28,12 +28,12 @@ services: - MODE=server - BASE_URL=http://${WINDMILL_HOST} depends_on: - db: + windmill-postgres: condition: service_healthy volumes: - - worker_logs:/tmp/windmill/logs + - windmill-worker-logs:/tmp/windmill/logs - windmill_worker: + windmill-worker: image: ghcr.io/windmill-labs/windmill:main deploy: replicas: 3 @@ -49,14 +49,14 @@ services: - MODE=worker - WORKER_GROUP=default depends_on: - db: + windmill-postgres: condition: service_healthy volumes: - /var/run/docker.sock:/var/run/docker.sock - - worker_dependency_cache:/tmp/windmill/cache - - worker_logs:/tmp/windmill/logs + - windmill-worker-cache:/tmp/windmill/cache + - windmill-worker-logs:/tmp/windmill/logs - windmill_worker_native: + windmill-worker-native: image: ghcr.io/windmill-labs/windmill:main deploy: replicas: 1 @@ -74,20 +74,20 @@ services: - NUM_WORKERS=8 - SLEEP_QUEUE=200 depends_on: - db: + windmill-postgres: condition: service_healthy volumes: - - worker_logs:/tmp/windmill/logs + - windmill-worker-logs:/tmp/windmill/logs - lsp: + windmill-lsp: image: ghcr.io/windmill-labs/windmill-lsp:latest restart: unless-stopped networks: - dokploy-network volumes: - - lsp_cache:/root/.cache + - windmill-lsp-cache:/root/.cache - caddy: + windmill-caddy: image: ghcr.io/windmill-labs/caddy-l4:latest restart: unless-stopped networks: @@ -97,11 +97,15 @@ services: environment: - BASE_URL=":80" depends_on: - - windmill_server - - lsp + - windmill-server + - windmill-lsp + +networks: + dokploy-network: + external: true volumes: - db_data: - worker_dependency_cache: - worker_logs: - lsp_cache: \ No newline at end of file + windmill-postgres-data: + windmill-worker-cache: + windmill-worker-logs: + windmill-lsp-cache: \ No newline at end of file diff --git a/apps/dokploy/templates/windmill/index.ts b/apps/dokploy/templates/windmill/index.ts index 5d6aae3c..b96a8c03 100644 --- a/apps/dokploy/templates/windmill/index.ts +++ b/apps/dokploy/templates/windmill/index.ts @@ -14,14 +14,14 @@ export function generate(schema: Schema): Template { { host: mainDomain, port: 80, - serviceName: "caddy", + serviceName: "windmill-caddy", }, ]; const envs = [ `WINDMILL_HOST=${mainDomain}`, `POSTGRES_PASSWORD=${postgresPassword}`, - `DATABASE_URL=postgres://postgres:${postgresPassword}@db/windmill?sslmode=disable`, + `DATABASE_URL=postgres://postgres:${postgresPassword}@windmill-postgres/windmill?sslmode=disable`, ]; const mounts: Template["mounts"] = [ @@ -29,8 +29,8 @@ export function generate(schema: Schema): Template { filePath: "Caddyfile", content: `:80 { bind 0.0.0.0 - reverse_proxy /ws/* http://lsp:3001 - reverse_proxy /* http://windmill_server:8000 + reverse_proxy /ws/* http://windmill-lsp:3001 + reverse_proxy /* http://windmill-server:8000 }`, }, ]; From 9003e43702ec01d37eeb8cdac8a2b8d306894053 Mon Sep 17 00:00:00 2001 From: DrMxrcy Date: Thu, 21 Nov 2024 01:54:15 -0500 Subject: [PATCH 3/6] fix(template): InvoiceShelf Naming --- .../templates/invoiceshelf/docker-compose.yml | 24 +++++++++++-------- apps/dokploy/templates/invoiceshelf/index.ts | 2 +- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/apps/dokploy/templates/invoiceshelf/docker-compose.yml b/apps/dokploy/templates/invoiceshelf/docker-compose.yml index ac4c8d26..5afdd152 100644 --- a/apps/dokploy/templates/invoiceshelf/docker-compose.yml +++ b/apps/dokploy/templates/invoiceshelf/docker-compose.yml @@ -1,12 +1,12 @@ version: "3.8" services: - invoiceshelf_db: + invoiceshelf-postgres: image: postgres:15 networks: - dokploy-network volumes: - - postgres_data:/var/lib/postgresql/data + - invoiceshelf-postgres-data:/var/lib/postgresql/data environment: - POSTGRES_PASSWORD=${DB_PASSWORD} - POSTGRES_USER=${DB_USERNAME} @@ -17,13 +17,13 @@ services: timeout: 5s retries: 5 - invoiceshelf: + invoiceshelf-app: image: invoiceshelf/invoiceshelf:latest networks: - dokploy-network volumes: - - app_data:/data - - app_conf:/conf + - invoiceshelf-app-data:/data + - invoiceshelf-app-conf:/conf environment: - PHP_TZ=UTC - TIMEZONE=UTC @@ -32,7 +32,7 @@ services: - APP_DEBUG=false - APP_URL=http://${INVOICESHELF_HOST} - DB_CONNECTION=pgsql - - DB_HOST=invoiceshelf_db + - DB_HOST=invoiceshelf-postgres - DB_PORT=5432 - DB_DATABASE=${DB_DATABASE} - DB_USERNAME=${DB_USERNAME} @@ -46,10 +46,14 @@ services: - SANCTUM_STATEFUL_DOMAINS=${INVOICESHELF_HOST} - STARTUP_DELAY=10 depends_on: - invoiceshelf_db: + invoiceshelf-postgres: condition: service_healthy +networks: + dokploy-network: + external: true + volumes: - postgres_data: - app_data: - app_conf: \ No newline at end of file + invoiceshelf-postgres-data: + invoiceshelf-app-data: + invoiceshelf-app-conf: \ No newline at end of file diff --git a/apps/dokploy/templates/invoiceshelf/index.ts b/apps/dokploy/templates/invoiceshelf/index.ts index d8ae8f63..a83ebf07 100644 --- a/apps/dokploy/templates/invoiceshelf/index.ts +++ b/apps/dokploy/templates/invoiceshelf/index.ts @@ -16,7 +16,7 @@ export function generate(schema: Schema): Template { { host: mainDomain, port: 80, - serviceName: "invoiceshelf", + serviceName: "invoiceshelf-app", }, ]; From be8bd78bcc35197dbd101dd76d8494ff791ddde7 Mon Sep 17 00:00:00 2001 From: DrMxrcy Date: Thu, 21 Nov 2024 01:55:40 -0500 Subject: [PATCH 4/6] fix(template): Postiz Template --- apps/dokploy/templates/postiz/docker-compose.yml | 10 +++++++--- apps/dokploy/templates/postiz/index.ts | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/dokploy/templates/postiz/docker-compose.yml b/apps/dokploy/templates/postiz/docker-compose.yml index 42a4b976..f842c92d 100644 --- a/apps/dokploy/templates/postiz/docker-compose.yml +++ b/apps/dokploy/templates/postiz/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.8" services: - postiz: + postiz-app: image: ghcr.io/gitroomhq/postiz-app:latest restart: always networks: @@ -37,7 +37,7 @@ services: POSTGRES_USER: ${DB_USER} POSTGRES_DB: ${DB_NAME} volumes: - - postgres-volume:/var/lib/postgresql/data + - postiz-postgres-data:/var/lib/postgresql/data healthcheck: test: pg_isready -U ${DB_USER} -d ${DB_NAME} interval: 10s @@ -57,8 +57,12 @@ services: volumes: - postiz-redis-data:/data +networks: + dokploy-network: + external: true + volumes: - postgres-volume: + postiz-postgres-data: postiz-redis-data: postiz-config: postiz-uploads: \ No newline at end of file diff --git a/apps/dokploy/templates/postiz/index.ts b/apps/dokploy/templates/postiz/index.ts index d9eef415..a05d2d94 100644 --- a/apps/dokploy/templates/postiz/index.ts +++ b/apps/dokploy/templates/postiz/index.ts @@ -18,7 +18,7 @@ export function generate(schema: Schema): Template { { host: mainDomain, port: 5000, - serviceName: "postiz", + serviceName: "postiz-app", }, ]; From 204143648d3bd8ce55b62b67a1e9c5c989614879 Mon Sep 17 00:00:00 2001 From: DrMxrcy Date: Thu, 21 Nov 2024 01:56:22 -0500 Subject: [PATCH 5/6] fix(template): Slash Naming Schema --- .../templates/slash/docker-compose.yml | 20 +++++++++++-------- apps/dokploy/templates/slash/index.ts | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/apps/dokploy/templates/slash/docker-compose.yml b/apps/dokploy/templates/slash/docker-compose.yml index fce3114e..75afc478 100644 --- a/apps/dokploy/templates/slash/docker-compose.yml +++ b/apps/dokploy/templates/slash/docker-compose.yml @@ -1,26 +1,26 @@ version: "3.8" services: - slash: + slash-app: image: yourselfhosted/slash:latest networks: - dokploy-network volumes: - - slash_data:/var/opt/slash + - slash-app-data:/var/opt/slash environment: - SLASH_DRIVER=postgres - - SLASH_DSN=postgresql://${DB_USER}:${DB_PASSWORD}@db:5432/${DB_NAME}?sslmode=disable + - SLASH_DSN=postgresql://${DB_USER}:${DB_PASSWORD}@slash-postgres:5432/${DB_NAME}?sslmode=disable depends_on: - db: + slash-postgres: condition: service_healthy restart: unless-stopped - db: + slash-postgres: image: postgres:16-alpine networks: - dokploy-network volumes: - - postgres_data:/var/lib/postgresql/data + - slash-postgres-data:/var/lib/postgresql/data environment: - POSTGRES_USER=${DB_USER} - POSTGRES_PASSWORD=${DB_PASSWORD} @@ -32,6 +32,10 @@ services: retries: 5 restart: unless-stopped +networks: + dokploy-network: + external: true + volumes: - slash_data: - postgres_data: \ No newline at end of file + slash-app-data: + slash-postgres-data: \ No newline at end of file diff --git a/apps/dokploy/templates/slash/index.ts b/apps/dokploy/templates/slash/index.ts index 4e05f74d..ba614fd8 100644 --- a/apps/dokploy/templates/slash/index.ts +++ b/apps/dokploy/templates/slash/index.ts @@ -16,7 +16,7 @@ export function generate(schema: Schema): Template { { host: mainDomain, port: 5231, - serviceName: "slash", + serviceName: "slash-app", }, ]; From 62ca8eec53ff99768e3f5c8feda5c8534d35026a Mon Sep 17 00:00:00 2001 From: DrMxrcy Date: Thu, 21 Nov 2024 01:57:27 -0500 Subject: [PATCH 6/6] fix(templates): DiscordTickets Naming --- .../discord-tickets/docker-compose.yml | 22 ++++++++++--------- .../templates/discord-tickets/index.ts | 4 +--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/apps/dokploy/templates/discord-tickets/docker-compose.yml b/apps/dokploy/templates/discord-tickets/docker-compose.yml index 44324e1e..e6e41288 100644 --- a/apps/dokploy/templates/discord-tickets/docker-compose.yml +++ b/apps/dokploy/templates/discord-tickets/docker-compose.yml @@ -1,14 +1,13 @@ version: "3.8" services: - mysql: + tickets-postgres: image: mysql:8 restart: unless-stopped - hostname: mysql networks: - dokploy-network volumes: - - tickets-mysql:/var/lib/mysql + - tickets-mysql-data:/var/lib/mysql environment: MYSQL_DATABASE: ${MYSQL_DATABASE} MYSQL_PASSWORD: ${MYSQL_PASSWORD} @@ -20,23 +19,22 @@ services: timeout: 5s retries: 5 - bot: + tickets-app: image: eartharoid/discord-tickets:4.0.21 depends_on: - mysql: + tickets-postgres: condition: service_healthy restart: unless-stopped - hostname: bot networks: - dokploy-network volumes: - - tickets-bot:/home/container/user + - tickets-app-data:/home/container/user - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro tty: true stdin_open: true environment: - DB_CONNECTION_URL: mysql://${MYSQL_USER}:${MYSQL_PASSWORD}@mysql/${MYSQL_DATABASE} + DB_CONNECTION_URL: mysql://${MYSQL_USER}:${MYSQL_PASSWORD}@tickets-postgres/${MYSQL_DATABASE} DISCORD_SECRET: ${DISCORD_SECRET} DISCORD_TOKEN: ${DISCORD_TOKEN} ENCRYPTION_KEY: ${ENCRYPTION_KEY} @@ -49,6 +47,10 @@ services: PUBLISH_COMMANDS: "true" SUPER: ${SUPER_USERS} +networks: + dokploy-network: + external: true + volumes: - tickets-mysql: - tickets-bot: \ No newline at end of file + tickets-mysql-data: + tickets-app-data: \ No newline at end of file diff --git a/apps/dokploy/templates/discord-tickets/index.ts b/apps/dokploy/templates/discord-tickets/index.ts index 48b40ed7..e11b78e6 100644 --- a/apps/dokploy/templates/discord-tickets/index.ts +++ b/apps/dokploy/templates/discord-tickets/index.ts @@ -13,7 +13,6 @@ export function generate(schema: Schema): Template { const mysqlUser = "tickets"; const mysqlDatabase = "tickets"; - // Generate encryption key in the format they use const encryptionKey = Array.from({ length: 48 }, () => Math.floor(Math.random() * 16).toString(16), ).join(""); @@ -22,7 +21,7 @@ export function generate(schema: Schema): Template { { host: mainDomain, port: 8169, - serviceName: "bot", + serviceName: "tickets-app", }, ]; @@ -33,7 +32,6 @@ export function generate(schema: Schema): Template { `MYSQL_ROOT_PASSWORD=${mysqlRootPassword}`, `MYSQL_USER=${mysqlUser}`, `ENCRYPTION_KEY=${encryptionKey}`, - // These need to be set by the user through the UI "# Follow the guide at: https://discordtickets.app/self-hosting/installation/docker/#creating-the-discord-application", "DISCORD_SECRET=", "DISCORD_TOKEN=",