env variables for influxdbV2 prototyping

- adds INFLUXDB_TOKEN and INFLUXDB_V2_URL
- change container name in INFLUXDB_URL to 'cc-influxdb'
This commit is contained in:
Christoph Kluge 2021-06-24 18:18:07 +02:00
parent fd233bd6a7
commit f64b251be2
5 changed files with 10 additions and 2 deletions

View File

@ -24,6 +24,7 @@ services:
SYMFONY_CLI_VERSION: 4.23.2 SYMFONY_CLI_VERSION: 4.23.2
MYSQL_PASSWORD: ${MYSQL_PASSWORD} MYSQL_PASSWORD: ${MYSQL_PASSWORD}
INFLUXDB_PASSWORD: ${INFLUXDB_PASSWORD} INFLUXDB_PASSWORD: ${INFLUXDB_PASSWORD}
INFLUXDB_ADMIN_TOKEN: ${INFLUXDB_ADMIN_TOKEN}
APP_ENVIRONMENT: ${APP_ENVIRONMENT} APP_ENVIRONMENT: ${APP_ENVIRONMENT}
environment: environment:
- APP_CLUSTERCOCKPIT_INIT=${APP_CLUSTERCOCKPIT_INIT} - APP_CLUSTERCOCKPIT_INIT=${APP_CLUSTERCOCKPIT_INIT}

View File

@ -14,7 +14,7 @@ ENV APP_SECRET=67d829bf61dc5f87a73fd814e2c9f629
ENV APP_DEBUG=1 ENV APP_DEBUG=1
ARG INFLUXDB_PASSWORD ARG INFLUXDB_PASSWORD
ARG MYSQL_PASSWORD ARG MYSQL_PASSWORD
ENV INFLUXDB_URL=influxdb://symfony:${INFLUXDB_PASSWORD}@influxdb:8086/ClusterCockpit ENV INFLUXDB_URL=influxdb://symfony:${INFLUXDB_PASSWORD}@cc-influxdb:8086/ClusterCockpit
ENV DATABASE_URL=mysql://symfony:${MYSQL_PASSWORD}@db:3306/ClusterCockpit ENV DATABASE_URL=mysql://symfony:${MYSQL_PASSWORD}@db:3306/ClusterCockpit
ENV CORS_ALLOW_ORIGIN=^https?://(localhost|127\\.0\\.0\\.1)(:[0-9]+)?$ ENV CORS_ALLOW_ORIGIN=^https?://(localhost|127\\.0\\.0\\.1)(:[0-9]+)?$

View File

@ -75,14 +75,18 @@ COPY symfony.ini /etc/php8/cli/conf.d/
COPY symfony.pool.conf /etc/php8/php-fpm.d/ COPY symfony.pool.conf /etc/php8/php-fpm.d/
COPY entrypoint.sh /entrypoint.sh COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ARG APP_ENVIRONMENT ARG APP_ENVIRONMENT
ENV APP_ENV=${APP_ENVIRONMENT} ENV APP_ENV=${APP_ENVIRONMENT}
ENV APP_SECRET=67d829bf61dc5f87a73fd814e2c9f629 ENV APP_SECRET=67d829bf61dc5f87a73fd814e2c9f629
ENV APP_DEBUG=1 ENV APP_DEBUG=1
ARG INFLUXDB_PASSWORD ARG INFLUXDB_PASSWORD
ARG INFLUXDB_ADMIN_TOKEN
ARG MYSQL_PASSWORD ARG MYSQL_PASSWORD
ENV INFLUXDB_URL=influxdb://symfony:${INFLUXDB_PASSWORD}@influxdb:8086/ClusterCockpit ENV INFLUXDB_URL=influxdb://symfony:${INFLUXDB_PASSWORD}@cc-influxdb:8086/ClusterCockpit
ENV INFLUXDB_V2_URL=http://cc-influxdb:8086
ENV INFLUXDB_TOKEN=${INFLUXDB_ADMIN_TOKEN}
ENV DATABASE_URL=mysql://symfony:${MYSQL_PASSWORD}@db:3306/ClusterCockpit ENV DATABASE_URL=mysql://symfony:${MYSQL_PASSWORD}@db:3306/ClusterCockpit
ENV CORS_ALLOW_ORIGIN=^https?://(localhost|127\\.0\\.0\\.1)(:[0-9]+)?$ ENV CORS_ALLOW_ORIGIN=^https?://(localhost|127\\.0\\.0\\.1)(:[0-9]+)?$

View File

@ -18,6 +18,7 @@ if [ "$APP_CLUSTERCOCKPIT_INIT" = true ]; then
ln -s /var/lib/job-archive var/job-archive ln -s /var/lib/job-archive var/job-archive
fi fi
# Reports php environment on container startup
php bin/console about php bin/console about
exec "$@" exec "$@"

View File

@ -78,6 +78,8 @@ env[APP_ENV] = $APP_ENV
env[APP_SECRET] = $APP_SECRET env[APP_SECRET] = $APP_SECRET
env[APP_DEBUG] = $APP_DEBUG env[APP_DEBUG] = $APP_DEBUG
env[INFLUXDB_URL] = $INFLUXDB_URL env[INFLUXDB_URL] = $INFLUXDB_URL
env[INFLUXDB_V2_URL] = $INFLUXDB_V2_URL
env[INFLUXDB_TOKEN] = $INFLUXDB_TOKEN
env[DATABASE_URL] = $DATABASE_URL env[DATABASE_URL] = $DATABASE_URL
env[CORS_ALLOW_ORIGIN] = $CORS_ALLOW_ORIGIN env[CORS_ALLOW_ORIGIN] = $CORS_ALLOW_ORIGIN