Skip to content

Commit 7a472df

Browse files
authored
Merge pull request #1239 from NagariaHussain/template-frappe-hr
feat(template): frappe HR, open source HR & Payroll software
2 parents 9d988c9 + 4864297 commit 7a472df

File tree

6 files changed

+427
-3
lines changed

6 files changed

+427
-3
lines changed
Lines changed: 5 additions & 0 deletions
Loading

apps/dokploy/templates/erpnext/docker-compose.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ services:
189189
bench set-config -g redis_socketio "redis://$$REDIS_QUEUE";
190190
bench set-config -gp socketio_port $$SOCKETIO_PORT;
191191
environment:
192-
DB_HOST: db
192+
DB_HOST: "${DB_HOST:-db}"
193193
DB_PORT: "3306"
194194
REDIS_CACHE: redis-cache:6379
195195
REDIS_QUEUE: redis-queue:6379
@@ -210,7 +210,7 @@ services:
210210
entrypoint: ["bash", "-c"]
211211
command:
212212
- >
213-
wait-for-it -t 120 db:3306;
213+
wait-for-it -t 120 $$DB_HOST:$$DB_PORT;
214214
wait-for-it -t 120 redis-cache:6379;
215215
wait-for-it -t 120 redis-queue:6379;
216216
export start=`date +%s`;
@@ -231,10 +231,12 @@ services:
231231
volumes:
232232
- sites:/home/frappe/frappe-bench/sites
233233
environment:
234+
SITE_NAME: ${SITE_NAME}
234235
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
236+
DB_HOST: ${DB_HOST:-db}
237+
DB_PORT: "${DB_PORT:-3306}"
235238
DB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
236239
INSTALL_APP_ARGS: ${INSTALL_APP_ARGS}
237-
SITE_NAME: ${SITE_NAME}
238240
networks:
239241
- bench-network
240242

@@ -262,6 +264,8 @@ services:
262264
db:
263265
image: mariadb:10.6
264266
deploy:
267+
mode: replicated
268+
replicas: ${ENABLE_DB:-0}
265269
restart_policy:
266270
condition: always
267271
healthcheck:
@@ -341,6 +345,10 @@ volumes:
341345
redis-queue-data:
342346
redis-socketio-data:
343347
sites:
348+
driver_opts:
349+
type: "${SITE_VOLUME_TYPE}"
350+
o: "${SITE_VOLUME_OPTS}"
351+
device: "${SITE_VOLUME_DEV}"
344352

345353
networks:
346354
bench-network:

apps/dokploy/templates/erpnext/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ export function generate(schema: Schema): Template {
2424
`ADMIN_PASSWORD=${adminPassword}`,
2525
`DB_ROOT_PASSWORD=${dbRootPassword}`,
2626
"MIGRATE=1",
27+
"ENABLE_DB=1",
28+
"DB_HOST=db",
2729
"CREATE_SITE=1",
2830
"CONFIGURE=1",
2931
"REGENERATE_APPS_TXT=1",

0 commit comments

Comments
 (0)