(refactor) Remove env files and scripts, update config files
This commit is contained in:
@@ -1,17 +1,34 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- default: mysql
|
||||
envKey: PANEL_DB_ROOT_PASSWORD
|
||||
labelEn: Root Password
|
||||
labelZh: root用户密码
|
||||
random: true
|
||||
required: true
|
||||
rule: paramComplexity
|
||||
type: password
|
||||
- default: 3306
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelEn: Port
|
||||
labelZh: 端口
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
formFields:
|
||||
- default: mysql
|
||||
envKey: PANEL_DB_ROOT_PASSWORD
|
||||
labelEn: Root Password
|
||||
labelZh: root用户密码
|
||||
random: true
|
||||
required: true
|
||||
type: password
|
||||
label:
|
||||
en: Root Password
|
||||
ja: ルートパスワード
|
||||
ms: Kata Laluan Root
|
||||
pt-br: Senha Root
|
||||
ru: Пароль Root
|
||||
ko: 루트 비밀번호
|
||||
zh-Hant: Root 密碼
|
||||
zh: Root 密码
|
||||
- default: 3306
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelEn: Port
|
||||
labelZh: 端口
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
label:
|
||||
en: Port
|
||||
ja: ポート
|
||||
ms: Port
|
||||
pt-br: Porta
|
||||
ru: Порт
|
||||
ko: 포트
|
||||
zh-Hant: 埠
|
||||
zh: 端口
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:5.6.51
|
||||
@@ -15,10 +14,10 @@ services:
|
||||
- ./conf/my.cnf:/etc/mysql/my.cnf
|
||||
- ./log:/var/log/mysql
|
||||
command:
|
||||
--character-set-server=utf8mb4
|
||||
--collation-server=utf8mb4_general_ci
|
||||
--explicit_defaults_for_timestamp=true
|
||||
--lower_case_table_names=1
|
||||
- --character-set-server=utf8mb4
|
||||
- --collation-server=utf8mb4_general_ci
|
||||
- --explicit_defaults_for_timestamp=true
|
||||
- --lower_case_table_names=1
|
||||
labels:
|
||||
createdBy: "Apps"
|
||||
networks:
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
# For advice on how to change settings please see
|
||||
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
|
||||
|
||||
[mysqld]
|
||||
#
|
||||
# Remove leading # and set to the amount of RAM for the most important data
|
||||
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
|
||||
# innodb_buffer_pool_size = 128M
|
||||
#
|
||||
# Remove leading # to turn on a very important data integrity option: logging
|
||||
# changes to the binary log between backups.
|
||||
# log_bin
|
||||
#
|
||||
# Remove leading # to set options mainly useful for reporting servers.
|
||||
# The server defaults are faster for transactions and fast SELECTs.
|
||||
# Adjust sizes as needed, experiment to find the optimal values.
|
||||
# join_buffer_size = 128M
|
||||
# sort_buffer_size = 2M
|
||||
# read_rnd_buffer_size = 2M
|
||||
skip-host-cache
|
||||
skip-name-resolve
|
||||
datadir=/var/lib/mysql
|
||||
socket=/var/run/mysqld/mysqld.sock
|
||||
secure-file-priv=/var/lib/mysql-files
|
||||
user=mysql
|
||||
|
||||
# Disabling symbolic-links is recommended to prevent assorted security risks
|
||||
symbolic-links=0
|
||||
|
||||
#log-error=/var/log/mysqld.log
|
||||
pid-file=/var/run/mysqld/mysqld.pid
|
||||
|
||||
max_allowed_packet=64M
|
||||
character_set_server=utf8mb4
|
||||
lower_case_table_names=1
|
||||
group_concat_max_len=1024000
|
||||
|
||||
[client]
|
||||
socket=/var/run/mysqld/mysqld.sock
|
||||
|
||||
!includedir /etc/mysql/conf.d/
|
||||
!includedir /etc/mysql/mysql.conf.d/
|
||||
@@ -6,8 +6,16 @@ additionalProperties:
|
||||
labelZh: root用户密码
|
||||
random: true
|
||||
required: true
|
||||
rule: paramComplexity
|
||||
type: password
|
||||
label:
|
||||
en: Root Password
|
||||
ja: ルートパスワード
|
||||
ms: Kata Laluan Root
|
||||
pt-br: Senha Root
|
||||
ru: Пароль Root
|
||||
ko: 루트 비밀번호
|
||||
zh-Hant: Root 密碼
|
||||
zh: Root 密码
|
||||
- default: 3306
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelEn: Port
|
||||
@@ -15,3 +23,12 @@ additionalProperties:
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
label:
|
||||
en: Port
|
||||
ja: ポート
|
||||
ms: Port
|
||||
pt-br: Porta
|
||||
ru: Порт
|
||||
ko: 포트
|
||||
zh-Hant: 埠
|
||||
zh: 端口
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:5.7.44
|
||||
@@ -17,10 +16,10 @@ services:
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
command:
|
||||
--character-set-server=utf8mb4
|
||||
--collation-server=utf8mb4_general_ci
|
||||
--explicit_defaults_for_timestamp=true
|
||||
--lower_case_table_names=1
|
||||
- --character-set-server=utf8mb4
|
||||
- --collation-server=utf8mb4_general_ci
|
||||
- --explicit_defaults_for_timestamp=true
|
||||
- --lower_case_table_names=1
|
||||
labels:
|
||||
createdBy: "Apps"
|
||||
networks:
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
# copyright© 2024 XinJiang Ms Studio
|
||||
ENV_FILE=.env
|
||||
@@ -1,2 +0,0 @@
|
||||
# copyright© 2024 XinJiang Ms Studio
|
||||
TZ=Asia/Shanghai
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
|
||||
# setup-1 add default values
|
||||
CURRENT_DIR=$(pwd)
|
||||
sed -i '/^ENV_FILE=/d' .env
|
||||
sed -i '/^GLOBAL_ENV_FILE=/d' .env
|
||||
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
|
||||
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env
|
||||
|
||||
mkdir -p "$MYSQL_ROOT_PATH"
|
||||
mkdir -p "$MYSQL_ROOT_PATH/config"
|
||||
mkdir -p "$MYSQL_ROOT_PATH/data"
|
||||
mkdir -p "$MYSQL_ROOT_PATH/log"
|
||||
|
||||
cp ./config/my.cnf "$MYSQL_ROOT_PATH/config/my.cnf"
|
||||
|
||||
chown -R 1000:1000 "$MYSQL_ROOT_PATH"
|
||||
|
||||
echo "Check Finish."
|
||||
|
||||
else
|
||||
echo "Error: .env file not found."
|
||||
fi
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
|
||||
echo "Check Finish."
|
||||
|
||||
else
|
||||
echo "Error: .env file not found."
|
||||
fi
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
|
||||
# setup-1 add default values
|
||||
CURRENT_DIR=$(pwd)
|
||||
sed -i '/^ENV_FILE=/d' .env
|
||||
sed -i '/^GLOBAL_ENV_FILE=/d' .env
|
||||
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
|
||||
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env
|
||||
|
||||
echo "Check Finish."
|
||||
|
||||
else
|
||||
echo "Error: .env file not found."
|
||||
fi
|
||||
@@ -1,17 +0,0 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- default: mysql
|
||||
envKey: PANEL_DB_ROOT_PASSWORD
|
||||
labelEn: Root Password
|
||||
labelZh: root用户密码
|
||||
random: true
|
||||
required: true
|
||||
rule: paramComplexity
|
||||
type: password
|
||||
- default: 3306
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelEn: Port
|
||||
labelZh: 端口
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
34
apps/mysql/8.0.43/data.yml
Normal file
34
apps/mysql/8.0.43/data.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- default: mysql
|
||||
envKey: PANEL_DB_ROOT_PASSWORD
|
||||
labelEn: Root Password
|
||||
labelZh: root用户密码
|
||||
random: true
|
||||
required: true
|
||||
type: password
|
||||
label:
|
||||
en: Root Password
|
||||
ja: ルートパスワード
|
||||
ms: Kata Laluan Root
|
||||
pt-br: Senha Root
|
||||
ru: Пароль Root
|
||||
ko: 루트 비밀번호
|
||||
zh-Hant: Root 密碼
|
||||
zh: Root 密码
|
||||
- default: 3306
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelEn: Port
|
||||
labelZh: 端口
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
label:
|
||||
en: Port
|
||||
ja: ポート
|
||||
ms: Port
|
||||
pt-br: Porta
|
||||
ru: Порт
|
||||
ko: 포트
|
||||
zh-Hant: 埠
|
||||
zh: 端口
|
||||
@@ -1,6 +1,6 @@
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8.0.40
|
||||
image: mysql:8.0.43
|
||||
container_name: ${CONTAINER_NAME}
|
||||
restart: always
|
||||
environment:
|
||||
@@ -1,17 +0,0 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- default: mysql
|
||||
envKey: PANEL_DB_ROOT_PASSWORD
|
||||
labelEn: Root Password
|
||||
labelZh: root用户密码
|
||||
random: true
|
||||
required: true
|
||||
rule: paramComplexity
|
||||
type: password
|
||||
- default: 3306
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelEn: Port
|
||||
labelZh: 端口
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
@@ -1,20 +0,0 @@
|
||||
[mysqld]
|
||||
host_cache_size=0
|
||||
skip-name-resolve
|
||||
datadir=/var/lib/mysql
|
||||
socket=/var/run/mysqld/mysqld.sock
|
||||
user=mysql
|
||||
|
||||
mysql_native_password=ON
|
||||
character_set_server=utf8mb4
|
||||
collation_server=utf8mb4_unicode_ci
|
||||
lower_case_table_names=1
|
||||
group_concat_max_len=1024000
|
||||
log_bin_trust_function_creators=1
|
||||
|
||||
secure_file_priv=
|
||||
pid_file=/var/run/mysqld/mysqld.pid
|
||||
[client]
|
||||
socket=/var/run/mysqld/mysqld.sock
|
||||
|
||||
!includedir /etc/mysql/conf.d/
|
||||
@@ -1,24 +0,0 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- default: "/home/mysql"
|
||||
edit: true
|
||||
envKey: MYSQL_ROOT_PATH
|
||||
labelZh: 数据持久化路径
|
||||
labelEn: Data persistence path
|
||||
required: true
|
||||
type: text
|
||||
- default: 3306
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelZh: 连接端口
|
||||
labelEn: Connection Port
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: ""
|
||||
envKey: MYSQL_ROOT_PASSWORD
|
||||
labelZh: 管理员密码
|
||||
labelEn: Admin Password
|
||||
random: true
|
||||
required: true
|
||||
rule: paramComplexity
|
||||
type: password
|
||||
@@ -1,29 +0,0 @@
|
||||
networks:
|
||||
1panel-network:
|
||||
external: true
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8.4.5
|
||||
container_name: ${CONTAINER_NAME}
|
||||
labels:
|
||||
createdBy: "Apps"
|
||||
restart: always
|
||||
networks:
|
||||
- 1panel-network
|
||||
user: 1000:1000
|
||||
ports:
|
||||
- ${PANEL_APP_PORT_HTTP}:3306
|
||||
env_file:
|
||||
- ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env}
|
||||
- ${ENV_FILE:-/etc/1panel/envs/default.env}
|
||||
volumes:
|
||||
- ${MYSQL_ROOT_PATH}/data:/var/lib/mysql
|
||||
- ${MYSQL_ROOT_PATH}/config/my.cnf:/etc/my.cnf
|
||||
- ${MYSQL_ROOT_PATH}/log:/var/log/mysql
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
command:
|
||||
- --character-set-server=utf8mb4
|
||||
- --collation-server=utf8mb4_unicode_ci
|
||||
- --mysql-native-password=ON
|
||||
@@ -1,2 +0,0 @@
|
||||
# copyright© 2024 XinJiang Ms Studio
|
||||
ENV_FILE=.env
|
||||
@@ -1,2 +0,0 @@
|
||||
# copyright© 2024 XinJiang Ms Studio
|
||||
TZ=Asia/Shanghai
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
|
||||
# setup-1 add default values
|
||||
CURRENT_DIR=$(pwd)
|
||||
sed -i '/^ENV_FILE=/d' .env
|
||||
sed -i '/^GLOBAL_ENV_FILE=/d' .env
|
||||
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
|
||||
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env
|
||||
|
||||
mkdir -p "$MYSQL_ROOT_PATH"
|
||||
mkdir -p "$MYSQL_ROOT_PATH/config"
|
||||
mkdir -p "$MYSQL_ROOT_PATH/data"
|
||||
mkdir -p "$MYSQL_ROOT_PATH/log"
|
||||
|
||||
cp ./config/my.cnf "$MYSQL_ROOT_PATH/config/my.cnf"
|
||||
|
||||
chown -R 1000:1000 "$MYSQL_ROOT_PATH"
|
||||
|
||||
echo "Check Finish."
|
||||
|
||||
else
|
||||
echo "Error: .env file not found."
|
||||
fi
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
|
||||
echo "Check Finish."
|
||||
|
||||
else
|
||||
echo "Error: .env file not found."
|
||||
fi
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
|
||||
# setup-1 add default values
|
||||
CURRENT_DIR=$(pwd)
|
||||
sed -i '/^ENV_FILE=/d' .env
|
||||
sed -i '/^GLOBAL_ENV_FILE=/d' .env
|
||||
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
|
||||
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env
|
||||
|
||||
echo "Check Finish."
|
||||
|
||||
else
|
||||
echo "Error: .env file not found."
|
||||
fi
|
||||
@@ -7,7 +7,8 @@ secure-file-priv=/var/lib/mysql-files
|
||||
user=mysql
|
||||
|
||||
pid-file=/var/run/mysqld/mysqld.pid
|
||||
lower_case_table_names=1
|
||||
[client]
|
||||
socket=/var/run/mysqld/mysqld.sock
|
||||
|
||||
!includedir /etc/mysql/conf.d/
|
||||
!includedir /etc/mysql/conf.d/
|
||||
34
apps/mysql/8.4.6/data.yml
Normal file
34
apps/mysql/8.4.6/data.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- default: mysql
|
||||
envKey: PANEL_DB_ROOT_PASSWORD
|
||||
labelEn: Root Password
|
||||
labelZh: root用户密码
|
||||
random: true
|
||||
required: true
|
||||
type: password
|
||||
label:
|
||||
en: Root Password
|
||||
ja: ルートパスワード
|
||||
ms: Kata Laluan Root
|
||||
pt-br: Senha Root
|
||||
ru: Пароль Root
|
||||
ko: 루트 비밀번호
|
||||
zh-Hant: Root 密碼
|
||||
zh: Root 密码
|
||||
- default: 3306
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelEn: Port
|
||||
labelZh: 端口
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
label:
|
||||
en: Port
|
||||
ja: ポート
|
||||
ms: Port
|
||||
pt-br: Porta
|
||||
ru: Порт
|
||||
ko: 포트
|
||||
zh-Hant: 埠
|
||||
zh: 端口
|
||||
@@ -1,6 +1,6 @@
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8.4.3
|
||||
image: mysql:8.4.6
|
||||
container_name: ${CONTAINER_NAME}
|
||||
restart: always
|
||||
environment:
|
||||
@@ -17,8 +17,6 @@ services:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
labels:
|
||||
createdBy: "Apps"
|
||||
command:
|
||||
- --mysql-native-password=on
|
||||
networks:
|
||||
1panel-network:
|
||||
external: true
|
||||
Reference in New Issue
Block a user