2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-09 23:00:56 +00:00

dbench: fix init issues (#55)

./dbench init would lead to 'missing argument: PATH' issue (#54), and could not find Procfile_docker and site-config.

Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com>
This commit is contained in:
Chinmay Pai 2018-10-13 17:20:04 +00:00 committed by GitHub
parent 2b1334d5a5
commit 6fc3bfbdcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

4
dbench
View File

@ -4,7 +4,7 @@ if [[ $# -eq 0 ]]; then
docker exec -it frappe bash
elif [ "$1" == 'init' ]; then
docker exec -itu root frappe bash -c "cd /home/frappe && chown -R frappe:frappe ./*"
docker exec -i frappe bash -c "cd .. && bench init $2 --ignore-exist --skip-redis-config-generation"
docker exec -i frappe bash -c "cd .. && bench init frappe-bench --ignore-exist --skip-redis-config-generation && cd frappe-bench"
docker exec -i frappe bash -c "mv Procfile_docker Procfile && mv sites/common_site_config_docker.json sites/common_site_config.json && bench set-mariadb-host mariadb"
elif [ "$1" == 'setup' ]; then
if [ "$2" == 'docker' ]; then
@ -49,4 +49,4 @@ elif [ "$1" == '-h' ]; then
else
IFS=" "
docker exec -it frappe bash -c "bench $*"
fi
fi