2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-09 14:50:58 +00:00
frappe_docker/setup-frappe.sh
2017-07-20 12:51:33 +05:30

14 lines
816 B
Bash
Executable File

docker-compose up -d
db_id=`docker ps | grep "mariadb" | awk '{print $1}'`
db_ip=`docker inspect --format '{{ .NetworkSettings.Networks.docker_default.IPAddress }}' $db_id`
app_id=`docker ps | grep docker_frappe | awk {'print $1'}`
app_ip=`docker inspect --format '{{ .NetworkSettings.Networks.docker_default.IPAddress }}' $app_id`
echo 'cd ../' >> ./bash_for_container.sh
echo 'bench init frappe-bench && cd frappe-bench' >> ./bash_for_container.sh
echo 'bench set-mariadb-host '$db_ip >> ./bash_for_container.sh
echo 'bench new-site site1' >> bash_for_container.sh
echo 'bench --site site1 install-app erpnext' >> bash_for_container.sh
echo 'bench start' >> bash_for_container.sh
docker cp bash_for_container.sh $app_id:/home/frappe/code
docker exec -it $app_id bash -c 'cd /home/frappe/code; exec "${SHELL:-sh}"'