mirror of
https://github.com/Dokploy/templates
synced 2025-06-26 18:16:07 +00:00
feat: Add numerous new blueprint templates for various applications
This commit is contained in:
27
blueprints/phpmyadmin/docker-compose.yml
Normal file
27
blueprints/phpmyadmin/docker-compose.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
db:
|
||||
image: mysql:5.7
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
|
||||
MYSQL_DATABASE: tu_base_de_datos
|
||||
MYSQL_USER: ${MYSQL_USER}
|
||||
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
||||
volumes:
|
||||
- db_data:/var/lib/mysql
|
||||
|
||||
|
||||
phpmyadmin:
|
||||
image: phpmyadmin/phpmyadmin:5.2.1
|
||||
environment:
|
||||
PMA_HOST: db
|
||||
PMA_USER: ${MYSQL_USER}
|
||||
PMA_PASSWORD: ${MYSQL_PASSWORD}
|
||||
PMA_ARBITRARY: 1
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
driver: local
|
||||
32
blueprints/phpmyadmin/index.ts
Normal file
32
blueprints/phpmyadmin/index.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import {
|
||||
type DomainSchema,
|
||||
type Schema,
|
||||
type Template,
|
||||
generatePassword,
|
||||
generateRandomDomain,
|
||||
} from "../utils";
|
||||
|
||||
export function generate(schema: Schema): Template {
|
||||
const mainDomain = generateRandomDomain(schema);
|
||||
const rootPassword = generatePassword(32);
|
||||
const password = generatePassword(32);
|
||||
|
||||
const domains: DomainSchema[] = [
|
||||
{
|
||||
host: mainDomain,
|
||||
port: 80,
|
||||
serviceName: "phpmyadmin",
|
||||
},
|
||||
];
|
||||
const envs = [
|
||||
`MYSQL_ROOT_PASSWORD=${rootPassword}`,
|
||||
"MYSQL_DATABASE=mysql",
|
||||
"MYSQL_USER=phpmyadmin",
|
||||
`MYSQL_PASSWORD=${password}`,
|
||||
];
|
||||
|
||||
return {
|
||||
envs,
|
||||
domains,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user