mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat(templates): add odoo template
This commit is contained in:
parent
898880634a
commit
ed0f3cadd6
BIN
public/templates/odoo.png
Normal file
BIN
public/templates/odoo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 84 KiB |
43
templates/odoo/docker-compose.yml
Normal file
43
templates/odoo/docker-compose.yml
Normal file
@ -0,0 +1,43 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
web:
|
||||
image: odoo:16.0
|
||||
networks:
|
||||
- dokploy-network
|
||||
depends_on:
|
||||
- db
|
||||
ports:
|
||||
- ${ODOO_PORT}
|
||||
environment:
|
||||
- HOST=db
|
||||
- USER=odoo
|
||||
- PASSWORD=odoo
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.${HASH}.rule=Host(`${ODOO_HOST}`)"
|
||||
- "traefik.http.services.${HASH}.loadbalancer.server.port=${ODOO_PORT}"
|
||||
volumes:
|
||||
- odoo-web-data:/var/lib/odoo
|
||||
- ./config:/etc/odoo
|
||||
- ./addons:/mnt/extra-addons
|
||||
|
||||
db:
|
||||
image: postgres:13
|
||||
networks:
|
||||
- dokploy-network
|
||||
environment:
|
||||
- POSTGRES_DB=postgres
|
||||
- POSTGRES_USER=odoo
|
||||
- POSTGRES_PASSWORD=odoo
|
||||
volumes:
|
||||
- odoo-db-data:/var/lib/postgresql/data
|
||||
|
||||
volumes:
|
||||
odoo-web-data:
|
||||
odoo-db-data:
|
||||
|
||||
|
||||
networks:
|
||||
dokploy-network:
|
||||
external: true
|
20
templates/odoo/index.ts
Normal file
20
templates/odoo/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 = [
|
||||
`ODOO_HOST=${randomDomain}`,
|
||||
"ODOO_PORT=8069",
|
||||
`HASH=${mainServiceHash}`,
|
||||
];
|
||||
|
||||
return {
|
||||
envs,
|
||||
};
|
||||
}
|
@ -152,4 +152,19 @@ export const templates: TemplateData[] = [
|
||||
tags: ["cms"],
|
||||
load: () => import("./wordpress/index").then((m) => m.generate),
|
||||
},
|
||||
{
|
||||
id: "odoo",
|
||||
name: "Odoo",
|
||||
version: "16.0",
|
||||
description:
|
||||
"Odoo is a free and open source business management software that helps you manage your company's operations.",
|
||||
logo: "odoo.png",
|
||||
links: {
|
||||
github: "https://github.com/odoo/odoo",
|
||||
website: "https://odoo.com/",
|
||||
docs: "https://www.odoo.com/documentation/",
|
||||
},
|
||||
tags: ["cms"],
|
||||
load: () => import("./odoo/index").then((m) => m.generate),
|
||||
},
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user