标签:prism 添加 test javascrip roi mon details 用户 number
1.首先安装docker和docker-compose:
docker:
curl -sSL https://get.daocloud.io/docker | sh
将当前用户添加到docker用户组:
sudo gpasswd -a ${USER} docker
su root 切换到root用户
su yifan 再切换到原来的应用用户以上配置才生效
docker-compose:
apt remove docker-compose
pip install docker-compose -i https://mirrors.aliyun.com/pypi/simple/
在.bashrc中增加
export PATH="/home/yifan/.local/bin":$PATH
2. 编写docker-compose:
docker-compose up -d
http://localhost:8000
{
set {
_:luke <name> "Luke Skywalker" .
_:leia <name> "Princess Leia" .
_:han <name> "Han Solo" .
_:lucas <name> "George Lucas" .
_:irvin <name> "Irvin Kernshner" .
_:richard <name> "Richard Marquand" .
_:sw1 <name> "Star Wars: Episode IV - A New Hope" .
_:sw1 <release_date> "1977-05-25" .
_:sw1 <revenue> "775000000" .
_:sw1 <running_time> "121" .
_:sw1 <starring> _:luke .
_:sw1 <starring> _:leia .
_:sw1 <starring> _:han .
_:sw1 <director> _:lucas .
_:sw2 <name> "Star Wars: Episode V - The Empire Strikes Back" .
_:sw2 <release_date> "1980-05-21" .
_:sw2 <revenue> "534000000" .
_:sw2 <running_time> "124" .
_:sw2 <starring> _:luke .
_:sw2 <starring> _:leia .
_:sw2 <starring> _:han .
_:sw2 <director> _:irvin .
_:sw3 <name> "Star Wars: Episode VI - Return of the Jedi" .
_:sw3 <release_date> "1983-05-25" .
_:sw3 <revenue> "572000000" .
_:sw3 <running_time> "131" .
_:sw3 <starring> _:luke .
_:sw3 <starring> _:leia .
_:sw3 <starring> _:han .
_:sw3 <director> _:richard .
_:st1 <name> "Star Trek: The Motion Picture" .
_:st1 <release_date> "1979-12-07" .
_:st1 <revenue> "139000000" .
_:st1 <running_time> "132" .
}
}
拷贝到命令行,切换到mutate,然后run
curl localhost:8080/alter -XPOST -d $‘
name: string @index(term) .
release_date: datetime @index(year) .
revenue: float .
running_time: int .
‘ | python -m json.tool | less
{
me(func:allofterms(name, "Star Wars")) @filter(ge(release_date, "1980")) {
name
release_date
revenue
running_time
director {
name
}
starring {
name
}
}
}
拷贝到命令行,切换到query,然后run
标签:prism 添加 test javascrip roi mon details 用户 number
原文地址:https://www.cnblogs.com/jy451/p/10664431.html