mirror of
https://github.com/ClusterCockpit/cc-docker.git
synced 2024-12-27 08:29:05 +01:00
Fix errors. Add Symfony entrypoint.
This commit is contained in:
parent
fef8133a18
commit
d29e9aceec
@ -68,6 +68,8 @@ services:
|
|||||||
context: ./nginx
|
context: ./nginx
|
||||||
args:
|
args:
|
||||||
NGINX_SYMFONY_SERVER_NAME: ${NGINX_SYMFONY_SERVER_NAME}
|
NGINX_SYMFONY_SERVER_NAME: ${NGINX_SYMFONY_SERVER_NAME}
|
||||||
|
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
||||||
|
INFLUXDB_PASSWORD: ${INFLUXDB_PASSWORD}
|
||||||
ports:
|
ports:
|
||||||
- "${NGINX_PORT}:80"
|
- "${NGINX_PORT}:80"
|
||||||
depends_on:
|
depends_on:
|
||||||
|
@ -2,17 +2,20 @@ FROM nginx:1.19.6
|
|||||||
|
|
||||||
LABEL maintainer="Vincent Composieux <vincent.composieux@gmail.com>"
|
LABEL maintainer="Vincent Composieux <vincent.composieux@gmail.com>"
|
||||||
|
|
||||||
RUN mkdir -p /etc/nginx/templates \
|
RUN mkdir -p /etc/nginx/templates
|
||||||
mkdir -p /tmp/nginx
|
|
||||||
|
|
||||||
COPY nginx.conf /etc/nginx/
|
COPY nginx.conf /etc/nginx/
|
||||||
COPY templates/* /etc/nginx/templates/
|
COPY templates/* /etc/nginx/templates/
|
||||||
COPY html/index.html.template /tmp/nginx/
|
|
||||||
|
|
||||||
ARG NGINX_SYMFONY_SERVER_NAME
|
ARG NGINX_SYMFONY_SERVER_NAME
|
||||||
ARG KIBANA_PORT
|
ENV APP_ENV=prod
|
||||||
RUN envsubst < /tmp/nginx/index.html.template > /usr/share/nginx/html/index.html; \
|
ENV APP_SECRET=67d829bf61dc5f87a73fd814e2c9f629
|
||||||
rm -fR /tmp/nginx
|
ENV APP_DEBUG=1
|
||||||
|
ARG INFLUXDB_PASSWORD
|
||||||
|
ARG MYSQL_PASSWORD
|
||||||
|
ENV INFLUXDB_URL=influxdb://symfony:${INFLUXDB_PASSWORD}@influxdb:8086/ClusterCockpit
|
||||||
|
ENV DATABASE_URL=mysql://symfony:${MYSQL_PASSWORD}@db:3306/ClusterCockpit
|
||||||
|
ENV CORS_ALLOW_ORIGIN=^https?://(localhost|127\\.0\\.0\\.1)(:[0-9]+)?$
|
||||||
|
|
||||||
CMD ["nginx"]
|
CMD ["nginx"]
|
||||||
|
|
||||||
|
@ -22,7 +22,6 @@ http {
|
|||||||
gzip on;
|
gzip on;
|
||||||
gzip_disable "msie6";
|
gzip_disable "msie6";
|
||||||
include /etc/nginx/conf.d/*.conf;
|
include /etc/nginx/conf.d/*.conf;
|
||||||
include /etc/nginx/sites-enabled/*;
|
|
||||||
open_file_cache max=100;
|
open_file_cache max=100;
|
||||||
client_body_temp_path /tmp 1 2;
|
client_body_temp_path /tmp 1 2;
|
||||||
client_body_buffer_size 256k;
|
client_body_buffer_size 256k;
|
||||||
|
@ -77,13 +77,15 @@ COPY entrypoint.sh /entrypoint.sh
|
|||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
ENV APP_ENV=prod
|
ENV APP_ENV=prod
|
||||||
ENV APP_DEBUG=0
|
ENV APP_SECRET=67d829bf61dc5f87a73fd814e2c9f629
|
||||||
|
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}@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]+)?$
|
||||||
|
|
||||||
|
WORKDIR /var/www/symfony
|
||||||
EXPOSE 9001
|
EXPOSE 9001
|
||||||
CMD ["php-fpm8", "-F"]
|
CMD ["php-fpm8", "-F"]
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
rm -rf /var/www/symfony/* /var/www/symfony/.*
|
rm -rf /var/www/symfony/* /var/www/symfony/.*
|
||||||
# git clone https://github.com/ClusterCockpit/ClusterCockpit.git /var/www/symfony/.
|
|
||||||
|
|
||||||
cd /var/www/symfony
|
cd /var/www/symfony
|
||||||
|
|
||||||
git init
|
git init
|
||||||
@ -12,7 +10,8 @@ git checkout feature-47-introduce-graphql-api
|
|||||||
composer install --no-dev --no-progress --optimize-autoloader
|
composer install --no-dev --no-progress --optimize-autoloader
|
||||||
yarn install
|
yarn install
|
||||||
yarn encore production
|
yarn encore production
|
||||||
# bin/console doc:mig:mig --no-interaction
|
# php bin/console doctrine:schema:create --no-interaction
|
||||||
# bin/console doc:fix:load --no-interaction
|
#php bin/console doctrine:migrations:migrate --no-interaction
|
||||||
|
#php bin/console doc:fix:load --no-interaction
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
@ -74,8 +74,11 @@ pm.max_spare_servers = 3
|
|||||||
;---------------------
|
;---------------------
|
||||||
|
|
||||||
; Make specific Docker environment variables available to PHP
|
; Make specific Docker environment variables available to PHP
|
||||||
env[DB_1_ENV_MYSQL_DATABASE] = $DB_1_ENV_MYSQL_DATABASE
|
env[APP_ENV] = $APP_ENV
|
||||||
env[DB_1_ENV_MYSQL_USER] = $DB_1_ENV_MYSQL_USER
|
env[APP_SECRET] = $APP_SECRET
|
||||||
env[DB_1_ENV_MYSQL_PASSWORD] = $DB_1_ENV_MYSQL_PASSWORD
|
env[APP_DEBUG] = $APP_DEBUG
|
||||||
|
env[INFLUXDB_URL] = $INFLUXDB_URL
|
||||||
|
env[DATABASE_URL] = $DATABASE_URL
|
||||||
|
env[CORS_ALLOW_ORIGIN] = $CORS_ALLOW_ORIGIN
|
||||||
|
|
||||||
catch_workers_output = yes
|
catch_workers_output = yes
|
||||||
|
Loading…
Reference in New Issue
Block a user