{triplestore,sql}: Mount directories to allow dynamic import

This commit is contained in:
Tom Wiesing 2022-11-22 12:58:11 +01:00
parent 099c4457b5
commit 3a32b7f03a
No known key found for this signature in database
4 changed files with 5 additions and 1 deletions

View file

@ -48,6 +48,7 @@ func (sql *SQL) Stack(env environment.Environment) component.StackWithResources
MakeDirsPerm: environment.DefaultDirPerm, MakeDirsPerm: environment.DefaultDirPerm,
MakeDirs: []string{ MakeDirs: []string{
"data", "data",
"imports",
}, },
}) })
} }

View file

@ -5,6 +5,7 @@ services:
image: mariadb image: mariadb
volumes: volumes:
- "./data/:/var/lib/mysql" - "./data/:/var/lib/mysql"
- "./imports/:/imports/"
ports: ports:
- 127.0.0.1:3306:3306 - 127.0.0.1:3306:3306
labels: labels:

View file

@ -47,6 +47,7 @@ func (ts *Triplestore) Stack(env environment.Environment) component.StackWithRes
filepath.Join("data", "data"), filepath.Join("data", "data"),
filepath.Join("data", "work"), filepath.Join("data", "work"),
filepath.Join("data", "logs"), filepath.Join("data", "logs"),
filepath.Join("data", "import"),
}, },
}) })
} }

View file

@ -9,7 +9,8 @@ services:
- './data/data:/opt/graphdb/data' - './data/data:/opt/graphdb/data'
- './data/work:/opt/graphdb/work' - './data/work:/opt/graphdb/work'
- './data/logs:/opt/graphdb/logs' - './data/logs:/opt/graphdb/logs'
command: "\"-Dgraphdb.home=/opt/graphdb -Ddefault.min.distinct.threshold=2G\"" - './data/import:/opt/graphdb/import'
command: "\"-Dgraphdb.home=/opt/graphdb -Dgraphdb.workbench.importDirectory=/opt/graphdb/import -Ddefault.min.distinct.threshold=2G\""
# Use 1GB of heap space # Use 1GB of heap space
environment: environment:
GDB_HEAP_SIZE: 16G GDB_HEAP_SIZE: 16G