From b09f1dc1a6f2593b2285f6bf4439fe94459338ce Mon Sep 17 00:00:00 2001 From: Vidar Date: Thu, 3 Oct 2019 15:57:59 +0200 Subject: [PATCH] Docker on 3.x (#455) * [Docker] Fixed problem with DATABASE_URL in install_dependencies * [Docker] Added default composer project name --- .env | 3 +++ doc/docker/install-dependencies.yml | 2 ++ doc/docker/install_script.sh | 2 ++ 3 files changed, 7 insertions(+) diff --git a/.env b/.env index 356b7754c5..e2612ed6ac 100644 --- a/.env +++ b/.env @@ -6,6 +6,9 @@ COMPOSE_DIR=. COMPOSER_HOME=~/.composer COMPOSER_MEMORY_LIMIT=4G +# Feel free to change project name to something meaningful (preferably unique per project) +COMPOSE_PROJECT_NAME=ezplatform + ## Docker images (name and version) PHP_IMAGE=ezsystems/php:7.3-v1 PHP_IMAGE_DEV=ezsystems/php:7.3-v1-dev diff --git a/doc/docker/install-dependencies.yml b/doc/docker/install-dependencies.yml index 30c1b2c618..c80078416b 100644 --- a/doc/docker/install-dependencies.yml +++ b/doc/docker/install-dependencies.yml @@ -16,4 +16,6 @@ services: - DATABASE_PASSWORD - DATABASE_NAME - COMPOSER_AUTH + - DATABASE_PLATFORM + - DATABASE_PORT command: ./doc/docker/install_script.sh diff --git a/doc/docker/install_script.sh b/doc/docker/install_script.sh index d3c86bb9c0..22645811cc 100755 --- a/doc/docker/install_script.sh +++ b/doc/docker/install_script.sh @@ -13,6 +13,8 @@ fi mkdir -p public/var if [ "${INSTALL_DATABASE}" == "1" ]; then + export DATABASE_URL=${DATABASE_PLATFORM}://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME} + php /scripts/wait_for_db.php composer ezplatform-install if [ "$APP_CMD" != '' ]; then