mirror of
https://github.com/ClusterCockpit/cc-docker.git
synced 2024-12-26 07:19:04 +01:00
Fix bugs in multi-stage docker. Replace sqldump
This commit is contained in:
parent
9d3d94542f
commit
5a434fb0cd
9
.env
9
.env
@ -1,9 +1,10 @@
|
||||
DATADIR=./data
|
||||
|
||||
########################################################################
|
||||
# APP
|
||||
########################################################################
|
||||
APP_CLUSTERCOCKPIT_INIT=true
|
||||
APP_ENVIRONMENT=prod #either prod or dev
|
||||
APP_CLUSTERCOCKPIT_INIT=false
|
||||
APP_ENVIRONMENT=prod
|
||||
|
||||
########################################################################
|
||||
# MySQL
|
||||
@ -16,7 +17,7 @@ MYSQL_PASSWORD=symfony
|
||||
########################################################################
|
||||
# INFLUXDB
|
||||
########################################################################
|
||||
INFLUXDB_PORT=8087
|
||||
INFLUXDB_PORT=8086
|
||||
INFLUXDB_PASSWORD=2RPJpkrduLgkpfQCpcBe1jYv
|
||||
INFLUXDB_ADMIN_TOKEN=egLfcf7fx0FESqFYU3RpAAbj
|
||||
|
||||
@ -36,4 +37,4 @@ PHPMYADMIN_PORT=8080
|
||||
# NGINX
|
||||
########################################################################
|
||||
NGINX_PORT=80
|
||||
NGINX_SYMFONY_SERVER_NAME=fangorn.fritz.box
|
||||
NGINX_SYMFONY_SERVER_NAME=localhost
|
||||
|
10
data/init.sh
10
data/init.sh
@ -4,3 +4,13 @@ mkdir symfony
|
||||
wget https://hpc-mover.rrze.uni-erlangen.de/HPC-Data/0x7b58aefb/eig7ahyo6fo2bais0ephuf2aitohv1ai/job-archive.tar.bz2
|
||||
tar xjf job-archive.tar.bz2
|
||||
rm ./job-archive.tar.bz2
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
if [ $1 == "dev" ]; then
|
||||
mkdir -p influxdb/data
|
||||
wget https://hpc-mover.rrze.uni-erlangen.de/HPC-Data/0x7b58aefb/eig7ahyo6fo2bais0ephuf2aitohv1ai/influxdbv2-data.tar.xz
|
||||
cd influxdb/data
|
||||
tar xJf ../../influxdbv2-data.tar.xz
|
||||
rm ../../influxdbv2-data.tar.xz
|
||||
fi
|
||||
fi
|
||||
|
File diff suppressed because one or more lines are too long
@ -4,6 +4,17 @@ services:
|
||||
- ${DATADIR}/sqldata:/var/lib/mysql
|
||||
|
||||
influxdb:
|
||||
container_name: cc-influxdb
|
||||
image: influxdb
|
||||
command: ["--reporting-disabled"]
|
||||
environment:
|
||||
DOCKER_INFLUXDB_INIT_MODE: setup
|
||||
DOCKER_INFLUXDB_INIT_USERNAME: symfony
|
||||
DOCKER_INFLUXDB_INIT_PASSWORD: ${INFLUXDB_PASSWORD}
|
||||
DOCKER_INFLUXDB_INIT_ORG: ClusterCockpit
|
||||
DOCKER_INFLUXDB_INIT_BUCKET: ClusterCockpit
|
||||
DOCKER_INFLUXDB_INIT_RETENTION: 2w
|
||||
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: ${INFLUXDB_ADMIN_TOKEN}
|
||||
ports:
|
||||
- "127.0.0.1:${INFLUXDB_PORT}:8086"
|
||||
volumes:
|
||||
|
@ -13,19 +13,6 @@ services:
|
||||
cap_add:
|
||||
- SYS_NICE
|
||||
|
||||
influxdb:
|
||||
container_name: cc-influxdb
|
||||
image: influxdb
|
||||
command: ["--reporting-disabled"]
|
||||
environment:
|
||||
DOCKER_INFLUXDB_INIT_MODE: setup
|
||||
DOCKER_INFLUXDB_INIT_USERNAME: symfony
|
||||
DOCKER_INFLUXDB_INIT_PASSWORD: ${INFLUXDB_PASSWORD}
|
||||
DOCKER_INFLUXDB_INIT_ORG: ClusterCockpit
|
||||
DOCKER_INFLUXDB_INIT_BUCKET: ClusterCockpit
|
||||
DOCKER_INFLUXDB_INIT_RETENTION: 2w
|
||||
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: ${INFLUXDB_ADMIN_TOKEN}
|
||||
|
||||
php:
|
||||
container_name: cc-php
|
||||
build:
|
||||
@ -55,6 +42,7 @@ services:
|
||||
NGINX_SYMFONY_SERVER_NAME: ${NGINX_SYMFONY_SERVER_NAME}
|
||||
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
||||
INFLUXDB_PASSWORD: ${INFLUXDB_PASSWORD}
|
||||
APP_ENVIRONMENT: ${APP_ENVIRONMENT}
|
||||
ports:
|
||||
- "127.0.0.1:${NGINX_PORT}:80"
|
||||
depends_on:
|
||||
|
@ -7,8 +7,9 @@ RUN mkdir -p /etc/nginx/templates
|
||||
COPY nginx.conf /etc/nginx/
|
||||
COPY templates/* /etc/nginx/templates/
|
||||
|
||||
ARG APP_ENVIRONMENT
|
||||
ARG NGINX_SYMFONY_SERVER_NAME
|
||||
ENV APP_ENV=prod
|
||||
ENV APP_ENV=${APP_ENVIRONMENT}
|
||||
ENV APP_SECRET=67d829bf61dc5f87a73fd814e2c9f629
|
||||
ENV APP_DEBUG=1
|
||||
ARG INFLUXDB_PASSWORD
|
||||
|
@ -3,13 +3,15 @@
|
||||
if [ "$APP_CLUSTERCOCKPIT_INIT" = true ]; then
|
||||
rm -rf /var/www/symfony/* /var/www/symfony/.??*
|
||||
git clone https://github.com/ClusterCockpit/ClusterCockpit .
|
||||
yarn install
|
||||
|
||||
if [ "$APP_ENV" = dev ]; then
|
||||
git checkout develop
|
||||
composer install --no-progress --optimize-autoloader
|
||||
yarn install
|
||||
yarn encore dev
|
||||
else
|
||||
composer install --no-dev --no-progress --optimize-autoloader
|
||||
yarn install
|
||||
yarn encore production
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user