diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 5473e7b2..0d5cc2c4 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -18,12 +18,12 @@ services: frappe: image: frappe/bench:latest - command: bash /workspace/init.sh + command: bash /workspace/docker/init.sh environment: - SHELL=/bin/bash working_dir: /home/frappe volumes: - - .:/workspace + - ..:/workspace ports: - 8000:8000 - 9000:9000 diff --git a/docker/init.sh b/docker/init.sh index ed74f101..1a010ed6 100644 --- a/docker/init.sh +++ b/docker/init.sh @@ -1,4 +1,4 @@ -#!bin/bash +#!/bin/bash if [ -d "/home/frappe/frappe-bench/apps/frappe" ]; then echo "Bench already exists, skipping init" @@ -37,4 +37,10 @@ bench --site lms.localhost set-config developer_mode 1 bench --site lms.localhost clear-cache bench use lms.localhost +# Import French translations from workspace (persisted in repo) +if [ -f "/workspace/lms/translations/fr.csv" ]; then + bench --site lms.localhost import-translations fr /workspace/lms/translations/fr.csv || true + bench --site lms.localhost clear-cache +fi + bench start