Closed jiamliang closed 1 year ago
I'd like to mount directories from my local file system into the container for the purpose of data persistence. Could you please advise which directories I should be mounting? Thanks a lot.
@jiamliang Sorry, we have just open sourced OpenSPG, and there are some details that are not perfect enough. We will complete the documentation in the future to make it easier for everyone to use.
The version we released is currently a beta version. It uses MySQL to store SPG-Schema and project metadata, TuGraph to store graph data, and ElasticSearch to index the graph data. If you want to persist this data, you can add volume configuration to the startup parameters of docker compose. Welcome to participate and use the OpenSPG project again.
The following changes are based on the docker compose configuration of our OpenSPG official website.
version: "3.7"
services:
openspg:
restart: always
image: baifuyu/openspg:latest
container_name: release-openspg
ports:
- "8887:8887"
depends_on:
- mysql
- tugraph
- elasticsearch
command: [
'--cloudext.repository.impl.jdbc.host=mysql',
'--builder.operator.python.exec=/usr/bin/python3.8',
'--builder.operator.python.paths=/usr/lib/python3.8/site-packages;/usr/local/lib/python3.8/dist-packages;'
]
environment:
- PYTHONPATH=/usr/lib/python3.8/site-packages:/usr/local/lib/python3.8/dist-packages
mysql:
restart: always
image: baifuyu/openspg-mysql:latest
container_name: release-openspg-mysql
environment:
TZ: Asia/Shanghai
LANG: C.UTF-8
ports:
- "3306:3306"
command: [
'--character-set-server=utf8mb4',
'--collation-server=utf8mb4_general_ci'
]
volumes:
- my-dataVolume:/var/lib/mysql
tugraph:
image: tugraph/tugraph-runtime-centos7:4.0.1
container_name: release-openspg-tugraph
# default username is admin and default password is 73@TuGraph
ports:
- "7070:7070"
- "9090:9090"
command: lgraph_server
volumes:
- my-dataVolume:/var/lgraph/data
elasticsearch:
image: elasticsearch:8.5.3
container_name: release-openspg-elasticsearch
ports:
- "9200:9200"
- "9300:9300"
environment:
- discovery.type=single-node
- xpack.security.enabled=false
volumes:
- my-dataVolume:/usr/share/elasticsearch/data
thanks a lot.
I'd like to mount directories from my local file system into the container for the purpose of data persistence. Could you please advise which directories I should be mounting? Thanks a lot.