mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Merge branch 'canary' into feature/langflow-template
This commit is contained in:
commit
b538a632d9
BIN
apps/dokploy/public/templates/unsend.png
Normal file
BIN
apps/dokploy/public/templates/unsend.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
78
apps/dokploy/templates/unsend/docker-compose.yml
Normal file
78
apps/dokploy/templates/unsend/docker-compose.yml
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
name: unsend-prod
|
||||||
|
|
||||||
|
services:
|
||||||
|
unsend-db-prod:
|
||||||
|
image: postgres:16
|
||||||
|
networks:
|
||||||
|
- dokploy-network
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=${POSTGRES_USER:?err}
|
||||||
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?err}
|
||||||
|
- POSTGRES_DB=${POSTGRES_DB:?err}
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
# ports:
|
||||||
|
# - "5432:5432"
|
||||||
|
volumes:
|
||||||
|
- database:/var/lib/postgresql/data
|
||||||
|
|
||||||
|
unsend-redis-prod:
|
||||||
|
image: redis:7
|
||||||
|
networks:
|
||||||
|
- dokploy-network
|
||||||
|
restart: always
|
||||||
|
# ports:
|
||||||
|
# - "6379:6379"
|
||||||
|
volumes:
|
||||||
|
- cache:/data
|
||||||
|
command: ["redis-server", "--maxmemory-policy", "noeviction"]
|
||||||
|
|
||||||
|
unsend-storage-prod:
|
||||||
|
image: minio/minio:RELEASE.2024-11-07T00-52-20Z
|
||||||
|
networks:
|
||||||
|
- dokploy-network
|
||||||
|
ports:
|
||||||
|
- 9002
|
||||||
|
- 9001
|
||||||
|
volumes:
|
||||||
|
- storage:/data
|
||||||
|
environment:
|
||||||
|
MINIO_ROOT_USER: unsend
|
||||||
|
MINIO_ROOT_PASSWORD: password
|
||||||
|
entrypoint: sh
|
||||||
|
command: -c 'mkdir -p /data/unsend && minio server /data --console-address ":9001" --address ":9002"'
|
||||||
|
|
||||||
|
unsend:
|
||||||
|
image: unsend/unsend:v1.2.4
|
||||||
|
networks:
|
||||||
|
- dokploy-network
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- ${PORT:-3000}
|
||||||
|
environment:
|
||||||
|
- PORT=${PORT:-3000}
|
||||||
|
- DATABASE_URL=${DATABASE_URL:?err}
|
||||||
|
- NEXTAUTH_URL=${NEXTAUTH_URL:?err}
|
||||||
|
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET:?err}
|
||||||
|
- AWS_ACCESS_KEY=${AWS_ACCESS_KEY:?err}
|
||||||
|
- AWS_SECRET_KEY=${AWS_SECRET_KEY:?err}
|
||||||
|
- AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION:?err}
|
||||||
|
- GITHUB_ID=${GITHUB_ID:?err}
|
||||||
|
- GITHUB_SECRET=${GITHUB_SECRET:?err}
|
||||||
|
- REDIS_URL=${REDIS_URL:?err}
|
||||||
|
- NEXT_PUBLIC_IS_CLOUD=${NEXT_PUBLIC_IS_CLOUD:-false}
|
||||||
|
- API_RATE_LIMIT=${API_RATE_LIMIT:-1}
|
||||||
|
depends_on:
|
||||||
|
unsend-db-prod:
|
||||||
|
condition: service_healthy
|
||||||
|
unsend-redis-prod:
|
||||||
|
condition: service_started
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
database:
|
||||||
|
cache:
|
||||||
|
storage:
|
44
apps/dokploy/templates/unsend/index.ts
Normal file
44
apps/dokploy/templates/unsend/index.ts
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import {
|
||||||
|
generateHash,
|
||||||
|
generateRandomDomain,
|
||||||
|
generateBase64,
|
||||||
|
type Template,
|
||||||
|
type Schema,
|
||||||
|
type DomainSchema,
|
||||||
|
} from "../utils";
|
||||||
|
|
||||||
|
export function generate(schema: Schema): Template {
|
||||||
|
const mainDomain = generateRandomDomain(schema);
|
||||||
|
const secretBase = generateBase64(64);
|
||||||
|
|
||||||
|
const domains: DomainSchema[] = [
|
||||||
|
{
|
||||||
|
host: mainDomain,
|
||||||
|
port: 3000,
|
||||||
|
serviceName: "unsend",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const envs = [
|
||||||
|
"REDIS_URL=redis://unsend-redis-prod:6379",
|
||||||
|
"POSTGRES_USER=postgres",
|
||||||
|
"POSTGRES_PASSWORD=postgres",
|
||||||
|
"POSTGRES_DB=unsend",
|
||||||
|
"DATABASE_URL=postgresql://postgres:postgres@unsend-db-prod:5432/unsend",
|
||||||
|
"NEXTAUTH_URL=http://localhost:3000",
|
||||||
|
`NEXTAUTH_SECRET=${secretBase}`,
|
||||||
|
"GITHUB_ID='Fill'",
|
||||||
|
"GITHUB_SECRET='Fill'",
|
||||||
|
"AWS_DEFAULT_REGION=us-east-1",
|
||||||
|
"AWS_SECRET_KEY='Fill'",
|
||||||
|
"AWS_ACCESS_KEY='Fill'",
|
||||||
|
"DOCKER_OUTPUT=1",
|
||||||
|
"API_RATE_LIMIT=1",
|
||||||
|
"DISCORD_WEBHOOK_URL=",
|
||||||
|
];
|
||||||
|
|
||||||
|
return {
|
||||||
|
envs,
|
||||||
|
domains,
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user