1 Star 0 Fork 1

Mashiro/wp-graphql

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
run-docker-local-app-xdebug.sh 871 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/env bash
set -eu
get_docker_host_os_ip() {
if [[ "$(uname -s)" == 'Linux' ]]; then
# HACK: For Linux, there's not a simple way to reliably get the IP of the host OS. For dev environments, the
# simplest approach is to assume the container can reach the Docker host at IP "172.17.0.1".
# https://github.com/docker/for-linux/issues/264#issuecomment-431300555
echo '172.17.0.1'
else
echo 'host.docker.internal'
fi
}
run_app_xdebug() {
env DOCKER_HOST_IP="$(get_docker_host_os_ip)" docker-compose -f docker/docker-compose.local-app.yml -f docker/docker-compose.local-app-xdebug.yml up --build
}
cleanup_docker_artifacts() {
docker-compose -f docker/docker-compose.local-app.yml -f docker/docker-compose.local-app-xdebug.yml down -v --rmi local 2> /dev/null
}
main() {
trap cleanup_docker_artifacts EXIT
run_app_xdebug
}
main
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mashirozx/wp-graphql.git
git@gitee.com:mashirozx/wp-graphql.git
mashirozx
wp-graphql
wp-graphql
master

搜索帮助