mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat: Added Blender template
This commit is contained in:
37
apps/dokploy/templates/blender/docker-compose.yml
Normal file
37
apps/dokploy/templates/blender/docker-compose.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
blender:
|
||||
image: lscr.io/linuxserver/blender:latest
|
||||
privileged: true
|
||||
container_name: blender
|
||||
security_opt:
|
||||
- seccomp:unconfined #optional
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
count: all
|
||||
capabilities:
|
||||
- compute
|
||||
- video
|
||||
- graphics
|
||||
- utility
|
||||
environment:
|
||||
- NVIDIA_VISIBLE_DEVICES=all
|
||||
- NVIDIA_DRIVER_CAPABILITIES=all
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=Etc/UTC
|
||||
- SUBFOLDER=/ #optional
|
||||
volumes:
|
||||
- blender:/config
|
||||
ports:
|
||||
- 3000:3000
|
||||
- 3001:3001
|
||||
restart: unless-stopped
|
||||
shm_size: 1gb
|
||||
|
||||
volumes:
|
||||
blender: null
|
||||
34
apps/dokploy/templates/blender/index.ts
Normal file
34
apps/dokploy/templates/blender/index.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import {
|
||||
generateHash,
|
||||
generateRandomDomain,
|
||||
type Template,
|
||||
type Schema,
|
||||
type DomainSchema,
|
||||
} from "../utils";
|
||||
|
||||
export function generate(schema: Schema): Template {
|
||||
const mainServiceHash = generateHash(schema.projectName);
|
||||
const mainDomain = generateRandomDomain(schema);
|
||||
|
||||
const domains: DomainSchema[] = [
|
||||
{
|
||||
host: mainDomain,
|
||||
port: 3000,
|
||||
serviceName: "blender",
|
||||
},
|
||||
];
|
||||
|
||||
const envs = [
|
||||
`PUID=1000`,
|
||||
`PGID=1000`,
|
||||
`TZ=Etc/UTC`,
|
||||
`SUBFOLDER=/`,
|
||||
`NVIDIA_VISIBLE_DEVICES=all`,
|
||||
`NVIDIA_DRIVER_CAPABILITIES=all`,
|
||||
];
|
||||
|
||||
return {
|
||||
envs,
|
||||
domains,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user