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.

This commit is contained in:
Jyri-Petteri Paloposki 2020-07-19 21:44:43 +03:00
parent 85e104006c
commit 869bf2a9fd
2 changed files with 6 additions and 2 deletions

View file

@ -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:

View file

@ -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"