From 99e28638176e362cff8afa6d66a9efa3297655a0 Mon Sep 17 00:00:00 2001 From: Robert Nasarek Date: Mon, 10 Oct 2022 13:06:10 +0200 Subject: [PATCH] add bind to drupal volume --- .dockerignore | 3 ++- .gitignore | 3 ++- README.md | 3 ++- docker-compose.yml | 4 ++++ prepare_volumes.sh | 5 +++++ 5 files changed, 15 insertions(+), 3 deletions(-) create mode 100755 prepare_volumes.sh diff --git a/.dockerignore b/.dockerignore index 79b4a83..345dfe6 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,4 @@ .env .git -graphdb.zip \ No newline at end of file +graphdb.zip +drupal-data \ No newline at end of file diff --git a/.gitignore b/.gitignore index 551d4b6..404b79e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .env -graphdb.zip \ No newline at end of file +graphdb.zip +drupal-data \ No newline at end of file diff --git a/README.md b/README.md index 6f2dba2..b670a41 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,8 @@ * TripleStore from slim-buster ## Start * Clone Repo with `git clone git@github.com:rnsrk/performance-drupal.git`. -* Rename .example-env to .env and set environment varibles fpr postgres service. +* Rename .example-env to .env and set environment varibles for postgres service. +* Run `./prepare_volumes.sh` to create drupal-data directory and add absolute path to .env variable. * Get [GraphDB free standalone server](https://graphdb.ontotext.com/). * Copy zip-file to to /graphdb_context and rename it to "graphdb.zip". * Start containers with `docker compose up -d`. diff --git a/docker-compose.yml b/docker-compose.yml index 92bccb5..3be788b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -59,5 +59,9 @@ services: volumes: db-data: drupal-data: + driver_opts: + type: none + device: ${DRUPAL_DATA} #NOTE needs full path (~ or ./ doesn't work) + o: bind graphdb-data: solr-data: diff --git a/prepare_volumes.sh b/prepare_volumes.sh new file mode 100755 index 0000000..95774c4 --- /dev/null +++ b/prepare_volumes.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +mkdir -p ./drupal-data + +printf "\nDRUPAL_DATA = ${PWD}/drupal-data" >> ./.env \ No newline at end of file