From da4e5f4a195d09972bef91722521a4210a29f242 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Mon, 2 Aug 2021 10:46:52 +0200 Subject: [PATCH 1/5] Rename SQL init directory --- data/{sql => sql-init}/ClusterCockpit.sql | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename data/{sql => sql-init}/ClusterCockpit.sql (100%) diff --git a/data/sql/ClusterCockpit.sql b/data/sql-init/ClusterCockpit.sql similarity index 100% rename from data/sql/ClusterCockpit.sql rename to data/sql-init/ClusterCockpit.sql From fa10e3afb08af65bf8d26218a13d242736c247f9 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Mon, 2 Aug 2021 11:13:07 +0200 Subject: [PATCH 2/5] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3b909cb..b753858 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,9 @@ Ports and Passwords are configured in `.env`. ## Using for DEMO purpose ### Info -* Demo starts in production environment. -* Uses prepared fixture data for databases (Changes will not be preserved). -* ClusterCockpit is initialized from scratch on every container start (Changes will not be preserved). +* The demo starts in Symfony production environment. +* It uses prepared fixture data for databases (Changes will not be preserved). +* ClusterCockpit is checked out and initialized from scratch on every container start (Changes will not be preserved). ### Setup The fixture data needs to be prepared once before first start of containers: From 12665b0326827b7b432d36e988fa6085a49053df Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Mon, 2 Aug 2021 12:47:50 +0200 Subject: [PATCH 3/5] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b753858..689ed90 100644 --- a/README.md +++ b/README.md @@ -44,8 +44,8 @@ To reuse an existing Symfony tree at `./data/symfony` you may change the environ ## Using for DEVELOP purpose ### Info -* `APP_ENVIRONMENT` variable in `.env` used to switch `php-fpm` container to development environement. -* `APP_CLUSTERCOCKPIT_INIT` variable in `.env` used to prevent container from initializing a new ClusterCockpit instance on every start. +* The `APP_ENVIRONMENT` variable in `.env` is used to switch the `php-fpm` container to development environment. +* The `APP_CLUSTERCOCKPIT_INIT` variable in `.env` is used to prevent the container from initializing a new ClusterCockpit instance on every start. * In this case, an existing Symfony tree at `./data/symfony` is required. * By default, this also uses prepared fixture data for databases. In order to use an existing database, changes in `.env` and `docker-compose.yml` are required (see below). From 651311b72108de398802b7c67aa60ee727fc5d41 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Tue, 3 Aug 2021 09:46:23 +0200 Subject: [PATCH 4/5] Remove PHP XDebug support --- .env | 7 ------- docker-compose.yml | 3 --- php-fpm/Dockerfile | 14 -------------- 3 files changed, 24 deletions(-) diff --git a/.env b/.env index d1d7826..3d95931 100644 --- a/.env +++ b/.env @@ -21,13 +21,6 @@ INFLUXDB_PORT=8086 INFLUXDB_PASSWORD=2RPJpkrduLgkpfQCpcBe1jYv INFLUXDB_ADMIN_TOKEN=egLfcf7fx0FESqFYU3RpAAbj -######################################################################## -# PHP -######################################################################## -PHP_XDEBUG_MODE=off -PHP_XDEBUG_CLIENT_PORT=5902 -PHP_XDEBUG_CLIENT_HOST=host.docker.internal - ######################################################################## # PHPMyAdmin ######################################################################## diff --git a/docker-compose.yml b/docker-compose.yml index 82e56f7..ab9b515 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,9 +18,6 @@ services: build: context: ./php-fpm args: - PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE} - PHP_XDEBUG_CLIENT_PORT: ${PHP_XDEBUG_CLIENT_PORT} - PHP_XDEBUG_CLIENT_HOST: ${PHP_XDEBUG_CLIENT_HOST} SYMFONY_CLI_VERSION: 4.23.2 MYSQL_PASSWORD: ${MYSQL_PASSWORD} INFLUXDB_PASSWORD: ${INFLUXDB_PASSWORD} diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 84d9e6c..5b592e7 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -37,20 +37,6 @@ RUN apk add --no-cache \ git \ curl -# Enable php8-xdebug if $PHP_XDEBUG_MODE is not empty -ARG PHP_XDEBUG_MODE=off -ARG PHP_XDEBUG_CLIENT_PORT=5902 -ARG PHP_XDEBUG_CLIENT_HOST=host.docker.internal -COPY xdebug.ini /etc/php8/conf.d/xdebug.ini.template -RUN if [[ "$PHP_XDEBUG_MODE" != "" ]]; then \ - apk add --no-cache php8-pecl-xdebug; \ - export PHP_XDEBUG_MODE=$PHP_XDEBUG_MODE; \ - export PHP_XDEBUG_CLIENT_PORT=$PHP_XDEBUG_CLIENT_PORT; \ - export PHP_XDEBUG_CLIENT_HOST=$PHP_XDEBUG_CLIENT_HOST; \ - envsubst < /etc/php8/conf.d/xdebug.ini.template > /etc/php8/conf.d/xdebug.ini; \ - fi -RUN rm -f /etc/php8/conf.d/xdebug.ini.template - RUN curl -sS https://getcomposer.org/installer | tee composer-setup.php \ && php8 composer-setup.php && rm composer-setup.php* \ && chmod +x composer.phar && mv composer.phar /usr/bin/composer \ From e89c9331b11b4c0677fb94cf12466c14a3cfd81b Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Tue, 3 Aug 2021 10:04:54 +0200 Subject: [PATCH 5/5] Rename db init directory --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index ab9b515..4ef4091 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,7 @@ services: MYSQL_USER: symfony MYSQL_PASSWORD: ${MYSQL_PASSWORD} volumes: - - ${DATADIR}/sql:/docker-entrypoint-initdb.d + - ${DATADIR}/sql-init:/docker-entrypoint-initdb.d cap_add: - SYS_NICE