mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat(template): add wordpress
This commit is contained in:
BIN
public/templates/wordpress.png
Normal file
BIN
public/templates/wordpress.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 192 KiB |
@@ -137,4 +137,19 @@ export const templates: TemplateData[] = [
|
||||
tags: ["automation"],
|
||||
load: () => import("./n8n/index").then((m) => m.generate),
|
||||
},
|
||||
{
|
||||
id: "wordpress",
|
||||
name: "Wordpress",
|
||||
version: "5.8.3",
|
||||
description:
|
||||
"Wordpress is a free and open source content management system (CMS) for publishing and managing websites.",
|
||||
logo: "wordpress.png",
|
||||
links: {
|
||||
github: "https://github.com/WordPress/WordPress",
|
||||
website: "https://wordpress.org/",
|
||||
docs: "https://wordpress.org/documentation/",
|
||||
},
|
||||
tags: ["cms"],
|
||||
load: () => import("./wordpress/index").then((m) => m.generate),
|
||||
},
|
||||
];
|
||||
|
||||
40
templates/wordpress/docker-compose.yml
Normal file
40
templates/wordpress/docker-compose.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
wordpress:
|
||||
image: wordpress:5.8.3
|
||||
networks:
|
||||
- dokploy-network
|
||||
ports:
|
||||
- ${WORDPRESS_PORT}
|
||||
environment:
|
||||
WORDPRESS_DB_HOST: db
|
||||
WORDPRESS_DB_USER: exampleuser
|
||||
WORDPRESS_DB_PASSWORD: examplepass
|
||||
WORDPRESS_DB_NAME: exampledb
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.${HASH}.rule=Host(`${WORDPRESS_HOST}`)"
|
||||
- "traefik.http.services.${HASH}.loadbalancer.server.port=${WORDPRESS_PORT}"
|
||||
volumes:
|
||||
- wordpress_data:/var/www/html
|
||||
|
||||
db:
|
||||
image: mysql:5.7.34
|
||||
networks:
|
||||
- dokploy-network
|
||||
environment:
|
||||
MYSQL_DATABASE: exampledb
|
||||
MYSQL_USER: exampleuser
|
||||
MYSQL_PASSWORD: examplepass
|
||||
MYSQL_ROOT_PASSWORD: rootpass
|
||||
volumes:
|
||||
- db_data:/var/lib/mysql
|
||||
|
||||
volumes:
|
||||
wordpress_data:
|
||||
db_data:
|
||||
|
||||
networks:
|
||||
dokploy-network:
|
||||
external: true
|
||||
20
templates/wordpress/index.ts
Normal file
20
templates/wordpress/index.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import {
|
||||
generateHash,
|
||||
generateRandomDomain,
|
||||
type Template,
|
||||
type Schema,
|
||||
} from "../utils";
|
||||
|
||||
export function generate(schema: Schema): Template {
|
||||
const mainServiceHash = generateHash(schema.projectName);
|
||||
const randomDomain = generateRandomDomain(schema);
|
||||
const envs = [
|
||||
`WORDPRESS_HOST=${randomDomain}`,
|
||||
"WORDPRESS_PORT=80",
|
||||
`HASH=${mainServiceHash}`,
|
||||
];
|
||||
|
||||
return {
|
||||
envs,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user