Merge branch 'main' of github.com:ClusterCockpit/cc-docker

This commit is contained in:
Lou Knauer 2021-08-03 12:06:01 +02:00
commit 5cbf778863
5 changed files with 6 additions and 30 deletions

7
.env
View File

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

View File

@ -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).

View File

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

View File

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