mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-23 00:05:09 +00:00
Merge 38e07097d1 into b5a5fc6618
This commit is contained in:
commit
c0fe53eb4c
1 changed files with 10 additions and 0 deletions
10
dbench
10
dbench
|
|
@ -9,7 +9,16 @@ display_usage() {
|
|||
echo ' -s adds site-names to /etc/hosts file in the container to facilitate multisite access'
|
||||
}
|
||||
|
||||
# start docker containers if they are not running (check for frappe)
|
||||
launch_containers() {
|
||||
docker exec frappe /bin/true 2>/dev/null
|
||||
if [[ $? -eq 1 ]]; then
|
||||
docker-compose up -d
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ $# -eq 0 ]]; then
|
||||
launch_containers
|
||||
docker exec -it frappe bash
|
||||
else
|
||||
while getopts ':hsc:' option; do
|
||||
|
|
@ -19,6 +28,7 @@ else
|
|||
exit
|
||||
;;
|
||||
c)
|
||||
launch_containers
|
||||
docker exec frappe bash -c "bench $OPTARG"
|
||||
;;
|
||||
s)
|
||||
|
|
|
|||
Loading…
Reference in a new issue