diff --git a/build.sh b/build.sh index c382e22..d6e4d34 100644 --- a/build.sh +++ b/build.sh @@ -5,6 +5,11 @@ HOME_DIR=`dirname ${REAL_VAR0}` TEMP_DIR="${HOME_DIR}/temp" SQL_DIR="${HOME_DIR}/sql" +if [ ! -f "${HOME_DIR}/.env" ] +then + cp "${HOME_DIR}/env-default" "${HOME_DIR}/.env" +fi + docker build -t reso-builder -f docker/docker-builder . docker run --name builder --mount type=bind,source="${HOME_DIR}",target=/usr/src/app -t reso-builder diff --git a/docker/scripts/build.sh b/docker/scripts/build.sh index 328bf96..7dbf0b8 100644 --- a/docker/scripts/build.sh +++ b/docker/scripts/build.sh @@ -9,10 +9,6 @@ SQL_DIR="${HOME_DIR}/sql" # Ensure we have directories set up [ -d "${TEMP_DIR}" ] && echo "temp directory found." || mkdir ${TEMP_DIR} [ -d "${SQL_DIR}" ] && echo "sql directory found." || mkdir ${SQL_DIR} -if [ ! -f "${HOME_DIR}/.env" ] -then - cp "${HOME_DIR}/env-default" "${HOME_DIR}/.env" -fi if [ -z "${SQL_HOST}" ] then diff --git a/env-default b/env-default index 3fb29f0..51a5248 100644 --- a/env-default +++ b/env-default @@ -1,4 +1,4 @@ -COMPOSE_FILE=docker-compose.yml:./optional/docker-db-compose.yml +COMPOSE_FILE=docker-compose.yml;./optional/docker-db-compose.yml SQL_HOST=docker-mysql SQL_USER=root SQL_PASSWORD=root