mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat: add HeyForm template
This commit is contained in:
48
apps/dokploy/templates/heyform/docker-compose.yml
Normal file
48
apps/dokploy/templates/heyform/docker-compose.yml
Normal file
@@ -0,0 +1,48 @@
|
||||
services:
|
||||
heyform:
|
||||
image: heyform/community-edition:latest
|
||||
restart: always
|
||||
volumes:
|
||||
# Persist uploaded images
|
||||
- heyform-data:/app/static/upload
|
||||
depends_on:
|
||||
- mongo
|
||||
- redis
|
||||
ports:
|
||||
- '9513:8000'
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
MONGO_URI: 'mongodb://mongo:27017/heyform'
|
||||
REDIS_HOST: redis
|
||||
REDIS_PORT: 6379
|
||||
networks:
|
||||
- heyform-network
|
||||
|
||||
mongo:
|
||||
image: percona/percona-server-mongodb:4.4
|
||||
restart: always
|
||||
networks:
|
||||
- heyform-network
|
||||
volumes:
|
||||
# Persist MongoDB data
|
||||
- mongo-data:/data/db
|
||||
|
||||
redis:
|
||||
image: redis
|
||||
restart: always
|
||||
command: "redis-server --appendonly yes"
|
||||
networks:
|
||||
- heyform-network
|
||||
volumes:
|
||||
# Persist KeyDB data
|
||||
- redis-data:/data
|
||||
|
||||
networks:
|
||||
heyform-network:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
heyform-data:
|
||||
mongo-data:
|
||||
redis-data:
|
||||
32
apps/dokploy/templates/heyform/index.ts
Normal file
32
apps/dokploy/templates/heyform/index.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import {
|
||||
type DomainSchema,
|
||||
type Schema,
|
||||
type Template,
|
||||
generateBase64,
|
||||
generateRandomDomain,
|
||||
} from "../utils";
|
||||
|
||||
export function generate(schema: Schema): Template {
|
||||
const mainDomain = generateRandomDomain(schema);
|
||||
const sessionKey = generateBase64(64);
|
||||
const formEncryptionKey = generateBase64(64);
|
||||
|
||||
const domains: DomainSchema[] = [
|
||||
{
|
||||
host: mainDomain,
|
||||
port: 9513,
|
||||
serviceName: "heyform",
|
||||
},
|
||||
];
|
||||
|
||||
const envs = [
|
||||
`APP_HOMEPAGE_URL=http://${mainDomain}`,
|
||||
`SESSION_KEY=${sessionKey}`,
|
||||
`FORM_ENCRYPTION_KEY=${formEncryptionKey}`,
|
||||
];
|
||||
|
||||
return {
|
||||
envs,
|
||||
domains,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user