From 869bf2a9fdd7b08bc9c4a1b9f86396c65ccedaf0 Mon Sep 17 00:00:00 2001 From: Jyri-Petteri Paloposki Date: Sun, 19 Jul 2020 21:44:43 +0300 Subject: [PATCH] Mount the mandatory config files separately in docker-compose, since it's including the whole /app from host and therefore the copies made in Dockerfile aren't available. --- docker-compose.yml | 4 +++- script/docker-environment | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index c2b45a1f..e6c33269 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,7 +13,9 @@ services: DATABASE_USERNAME: root DATABASE_PASSWORD_EMPTY: 1 volumes: - - ${VOLUME:-.:/app}:Z + - ${VOLUME:-.}:/app:Z + - ${VOLUME:-.}/config/database.docker.yml:/app/config/database.yml:Z + - ${VOLUME:-.}/config/site.docker.yml:/app/config/site.yml:Z ports: - 3000:3000 depends_on: diff --git a/script/docker-environment b/script/docker-environment index 8df83c1b..71e34f19 100755 --- a/script/docker-environment +++ b/script/docker-environment @@ -2,12 +2,14 @@ set -e +echo "Doing it here" + # Find our app dir appdir=$(cd $(dirname "$0")/.. && pwd) # Check if we've been told to run the command in Docker Composer. cmd="$@"; [ "$#" -eq 0 ] && cmd=bash -export VOLUME="$appdir:/app" +export VOLUME="$appdir" image=${DOCKER_IMAGE:=web} port_publish=""; [ "${BIND_DOCKER_SERVICE_PORTS:-}" = 1 ] && port_publish="--service-ports"