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/README.md b/README.md index 3b909cb..689ed90 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: @@ -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). 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 diff --git a/docker-compose.yml b/docker-compose.yml index 1430c0c..d8f39b5 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 @@ -22,9 +22,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 ad51db7..dd63425 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 \