Add mariadb to default setup, remove init sql

This commit is contained in:
Christoph Kluge 2022-06-23 18:00:41 +02:00
parent 9a7f750dd2
commit f7914b0291
8 changed files with 46 additions and 273 deletions

View File

File diff suppressed because one or more lines are too long

View File

@ -45,3 +45,31 @@ services:
- LDAP_DOMAIN=${LDAP_DOMAIN}
volumes:
- ${DATADIR}/ldap:/container/service/slapd/assets/config/bootstrap/ldif/custom
db:
container_name: cc-db
image: mariadb:latest
command: ["--default-authentication-plugin=mysql_native_password"]
environment:
MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD}
MARIADB_DATABASE: ${MARIADB_DATABASE}
MARIADB_USER: ${MARIADB_USER}
MARIADB_PASSWORD: ${MARIADB_PASSWORD}
ports:
- "127.0.0.1:${MARIADB_PORT}:3306"
# volumes:
# - ${DATADIR}/sql-init:/docker-entrypoint-initdb.d
cap_add:
- SYS_NICE
phpmyadmin:
container_name: cc-phpmyadmin
image: phpmyadmin
environment:
- PMA_HOST=cc-db
- PMA_USER=root
- PMA_PASSWORD=${MARIADB_ROOT_PASSWORD}
ports:
- "127.0.0.1:${PHPMYADMIN_PORT}:80"
depends_on:
- db

View File

@ -1,28 +0,0 @@
services:
db:
container_name: cc-db
image: mariadb:latest
command: ["--default-authentication-plugin=mysql_native_password"]
environment:
MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD}
MARIADB_DATABASE: ${MARIADB_DATABASE}
MARIADB_USER: ${MARIADB_USER}
MARIADB_PASSWORD: ${MARIADB_PASSWORD}
ports:
- "127.0.0.1:3336:3306"
volumes:
- ${DATADIR}/sql-init:/docker-entrypoint-initdb.d
cap_add:
- SYS_NICE
phpmyadmin:
container_name: cc-phpmyadmin
image: phpmyadmin
environment:
- PMA_HOST=cc-db
- PMA_USER=root
- PMA_PASSWORD=${MARIADB_ROOT_PASSWORD}
ports:
- "127.0.0.1:${PHPMYADMIN_PORT}:80"
depends_on:
- db

View File

@ -9,9 +9,9 @@ services:
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
ports:
- "127.0.0.1:3336:3306"
volumes:
- ${DATADIR}/sql-init:/docker-entrypoint-initdb.d
- "127.0.0.1:${MYSQL_PORT}:3306"
# volumes:
# - ${DATADIR}/sql-init:/docker-entrypoint-initdb.d
# - ${DATADIR}/sqldata:/var/lib/mysql
cap_add:
- SYS_NICE

View File

@ -13,6 +13,15 @@ INFLUXDB_BUCKET=ClusterCockpit
# Whether or not to check SSL Cert in Symfony Client, Default: false
INFLUXDB_SSL=false
########################################################################
# MARIADB
########################################################################
MARIADB_ROOT_PASSWORD=root
MARIADB_DATABASE=ClusterCockpit
MARIADB_USER=clustercockpit
MARIADB_PASSWORD=clustercockpit
MARIADB_PORT=3306
#########################################
# LDAP
########################################################################
@ -20,6 +29,11 @@ LDAP_ADMIN_PASSWORD=mashup
LDAP_ORGANISATION=NHR@FAU
LDAP_DOMAIN=rrze.uni-erlangen.de
########################################################################
# PHPMyAdmin
########################################################################
PHPMYADMIN_PORT=8081
########################################################################
# INTERNAL SETTINGS
########################################################################

View File

@ -1,16 +0,0 @@
########################################################################
# ADDITIONAL ENV VARIABLES FOR MARIABD AND PHPMYADMIN CONTAINERS
########################################################################
########################################################################
# MARIADB
########################################################################
MARIADB_ROOT_PASSWORD=root
MARIADB_DATABASE=ClusterCockpit
MARIADB_USER=clustercockpit
MARIADB_PASSWORD=clustercockpit
########################################################################
# PHPMyAdmin
########################################################################
PHPMYADMIN_PORT=8081

View File

@ -9,6 +9,7 @@ MYSQL_ROOT_PASSWORD=root
MYSQL_DATABASE=ClusterCockpit
MYSQL_USER=clustercockpit
MYSQL_PASSWORD=clustercockpit
MYSQL_PORT=3306
########################################################################
# PHPMyAdmin