add docker version

This commit is contained in:
Ludovic CANDELLIER
2023-09-13 23:04:55 +02:00
parent 53feef282f
commit dfe7625995
53 changed files with 24012 additions and 0 deletions

20
docker/mysql/Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
ARG MYSQL_VERSION
FROM mysql:latest
LABEL maintainer="Ludovic CANDELLIER <ludo@huma.net>"
#####################################
# Set Timezone
#####################################
ARG TZ=UTC
ENV TZ ${TZ}
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && chown -R mysql:root /var/lib/mysql/
COPY my.cnf /etc/mysql/conf.d/my.cnf
RUN chmod 0444 /etc/mysql/conf.d/my.cnf
CMD ["mysqld"]
EXPOSE 3306

View File

@@ -0,0 +1 @@
*.sql

View File

@@ -0,0 +1,33 @@
#
# Copy createdb.sql.example to createdb.sql
# then uncomment then set database name and username to create you need databases
#
# example: .env MYSQL_USER=appuser and needed db name is myshop_db
#
# CREATE DATABASE IF NOT EXISTS `myshop_db` ;
# GRANT ALL ON `myshop_db`.* TO 'appuser'@'%' ;
#
#
# this sql script will auto run when the mysql container starts and the $DATA_PATH_HOST/mysql not found.
#
# if your $DATA_PATH_HOST/mysql exists and you do not want to delete it, you can run by manual execution:
#
# docker-compose exec mysql bash
# mysql -u root -p < /docker-entrypoint-initdb.d/createdb.sql
#
#CREATE DATABASE IF NOT EXISTS `dev_db_1` COLLATE 'utf8_general_ci' ;
#GRANT ALL ON `dev_db_1`.* TO 'default'@'%' ;
#CREATE DATABASE IF NOT EXISTS `dev_db_2` COLLATE 'utf8_general_ci' ;
#GRANT ALL ON `dev_db_2`.* TO 'default'@'%' ;
#CREATE DATABASE IF NOT EXISTS `dev_db_3` COLLATE 'utf8_general_ci' ;
#GRANT ALL ON `dev_db_3`.* TO 'default'@'%' ;
#CREATE DATABASE IF NOT EXISTS `opensem` COLLATE 'utf8_general_ci' ;
#GRANT ALL ON `opensem`.* TO 'opensem'@'%' ;
#GRANT ALL PRIVILEGES ON *.* TO opensem@localhost WITH GRANT OPTION;
FLUSH PRIVILEGES ;

11
docker/mysql/my.cnf Normal file
View File

@@ -0,0 +1,11 @@
# The MySQL Client configuration file.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
[mysql]
[mysqld]
sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
character-set-server=utf8
default-authentication-plugin=mysql_native_password