Cleanup and fix inconsistencies.

Remove ping check for github.
This commit is contained in:
Jan Eitzinger 2021-08-25 11:24:24 +02:00
parent b64c2bcbc7
commit dfa7a91648
5 changed files with 15 additions and 16 deletions

3
.env
View File

@ -8,9 +8,10 @@ APP_ENVIRONMENT=prod
######################################################################## ########################################################################
# MySQL # MySQL
# The SQL port is not exposed outside the container
######################################################################## ########################################################################
MYSQL_ROOT_PASSWORD=root MYSQL_ROOT_PASSWORD=root
MYSQL_DATABASE=symfony MYSQL_DATABASE=ClusterCockpit
MYSQL_USER=symfony MYSQL_USER=symfony
MYSQL_PASSWORD=symfony MYSQL_PASSWORD=symfony

View File

@ -25,7 +25,7 @@ services:
container_name: cc-phpmyadmin container_name: cc-phpmyadmin
image: phpmyadmin image: phpmyadmin
environment: environment:
- PMA_HOST=db - PMA_HOST=cc-db
- PMA_USER=root - PMA_USER=root
- PMA_PASSWORD=${MYSQL_ROOT_PASSWORD} - PMA_PASSWORD=${MYSQL_ROOT_PASSWORD}
ports: ports:

View File

@ -5,8 +5,8 @@ services:
command: ["--default-authentication-plugin=mysql_native_password"] command: ["--default-authentication-plugin=mysql_native_password"]
environment: environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ClusterCockpit MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: symfony MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD} MYSQL_PASSWORD: ${MYSQL_PASSWORD}
volumes: volumes:
- ${DATADIR}/sql-init:/docker-entrypoint-initdb.d - ${DATADIR}/sql-init:/docker-entrypoint-initdb.d
@ -28,8 +28,11 @@ services:
context: ./php-fpm context: ./php-fpm
args: args:
SYMFONY_CLI_VERSION: 4.23.2 SYMFONY_CLI_VERSION: 4.23.2
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD} MYSQL_PASSWORD: ${MYSQL_PASSWORD}
INFLUXDB_PASSWORD: ${INFLUXDB_PASSWORD} INFLUXDB_PASSWORD: ${INFLUXDB_PASSWORD}
INFLUXDB_PORT: ${INFLUXDB_PORT}
INFLUXDB_ADMIN_TOKEN: ${INFLUXDB_ADMIN_TOKEN} INFLUXDB_ADMIN_TOKEN: ${INFLUXDB_ADMIN_TOKEN}
APP_ENVIRONMENT: ${APP_ENVIRONMENT} APP_ENVIRONMENT: ${APP_ENVIRONMENT}
environment: environment:
@ -61,4 +64,3 @@ services:
- NGINX_SYMFONY_SERVER_NAME=${NGINX_SYMFONY_SERVER_NAME} - NGINX_SYMFONY_SERVER_NAME=${NGINX_SYMFONY_SERVER_NAME}
volumes: volumes:
- ${DATADIR}/symfony:/var/www/symfony:cached - ${DATADIR}/symfony:/var/www/symfony:cached

View File

@ -70,14 +70,16 @@ 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
ENV REDIS_URL=redis://cc-redis
ARG INFLUXDB_PORT
ARG INFLUXDB_PASSWORD ARG INFLUXDB_PASSWORD
ARG INFLUXDB_ADMIN_TOKEN ARG INFLUXDB_ADMIN_TOKEN
ARG MYSQL_PASSWORD ENV INFLUXDB_URL=http://cc-influxdb:${INFLUXDB_PORT}
ENV INFLUXDB_URL=influxdb://symfony:${INFLUXDB_PASSWORD}@cc-influxdb:8086/ClusterCockpit
ENV INFLUXDB_V2_URL=http://cc-influxdb:8086
ENV REDIS_URL=redis://cc-redis
ENV INFLUXDB_TOKEN=${INFLUXDB_ADMIN_TOKEN} ENV INFLUXDB_TOKEN=${INFLUXDB_ADMIN_TOKEN}
ENV DATABASE_URL=mysql://symfony:${MYSQL_PASSWORD}@db:3306/ClusterCockpit ARG MYSQL_USER
ARG MYSQL_PASSWORD
ARG MYSQL_DATABASE
ENV DATABASE_URL=mysql://${MYSQL_USER}:${MYSQL_PASSWORD}@cc-db:3306/${MYSQL_DATABASE}
ENV CORS_ALLOW_ORIGIN=^https?://(localhost|127\\.0\\.0\\.1)(:[0-9]+)?$ ENV CORS_ALLOW_ORIGIN=^https?://(localhost|127\\.0\\.0\\.1)(:[0-9]+)?$
WORKDIR /var/www/symfony WORKDIR /var/www/symfony

View File

@ -2,12 +2,6 @@
if [ "$APP_CLUSTERCOCKPIT_INIT" = true ]; then if [ "$APP_CLUSTERCOCKPIT_INIT" = true ]; then
# Wait for docker dns able to resolve gitub
# Solves weird special case of container loading faster than github can be reached
until ping -c 1 github.com > /dev/null ; do
echo "Could not reach github.com yet ..."
sleep 1
done
rm -rf /var/www/symfony/* /var/www/symfony/.??* rm -rf /var/www/symfony/* /var/www/symfony/.??*
git clone https://github.com/ClusterCockpit/ClusterCockpit . git clone https://github.com/ClusterCockpit/ClusterCockpit .