diff --git a/apps/mysql/5.7.39/.env b/apps/mysql/5.7.39/.env deleted file mode 100644 index 0977c4b72..000000000 --- a/apps/mysql/5.7.39/.env +++ /dev/null @@ -1,6 +0,0 @@ -TZ=Asia/Shanghai -DATABASE=db -USER=mysql -PASSWORD=1qaz@WSX -ROOT_PASSWORD=1panel@mysql -PORT=3306 \ No newline at end of file diff --git a/apps/mysql/8.0.30/README.md b/apps/mysql/8.0.30/README.md new file mode 100644 index 000000000..7951cf6ae --- /dev/null +++ b/apps/mysql/8.0.30/README.md @@ -0,0 +1,20 @@ +Copyright (c) 2000, 2022, Oracle and/or its affiliates. + +This is a release of MySQL, an SQL database server. + +License information can be found in the LICENSE file. + +In test packages where this file is renamed README-test, the license +file is renamed LICENSE-test. + +This distribution may include materials developed by third parties. +For license and attribution notices for these materials, +please refer to the LICENSE file. + +For further information on MySQL or additional documentation, visit +http://dev.mysql.com/doc/ + +For additional downloads and the source of MySQL, visit +http://dev.mysql.com/downloads/ + +MySQL is brought to you by the MySQL team at Oracle. diff --git a/apps/mysql/8.0.30/conf/my.cnf b/apps/mysql/8.0.30/conf/my.cnf new file mode 100644 index 000000000..7be15c415 --- /dev/null +++ b/apps/mysql/8.0.30/conf/my.cnf @@ -0,0 +1,83 @@ + +[client] +port = 3306 +socket = /var/run/mysqld/mysqld.sock + +[mysqld_safe] +socket = /var/run/mysqld/mysqld.sock +nice = 0 + +[mysqld] +user = mysql +pid-file = /var/run/mysqld/mysqld.pid +socket = /var/run/mysqld/mysqld.sock +port = 3306 +basedir = /usr +datadir = /var/lib/mysql +tmpdir = /tmp +lc-messages-dir = /usr/share/mysql +skip-external-locking +skip-character-set-client-handshake +default-storage-engine = InnoDB +character-set-server = utf8 +transaction-isolation = READ-COMMITTED + + +bind-address = 127.0.0.1 +key_buffer = 16M +max_allowed_packet = 16M +thread_stack = 192K +thread_cache_size = 16 +myisam-recover = BACKUP +max_connections = 300 +table_open_cache = 64 +thread_concurrency = 10 +table_open_cache = 32 +thread_concurrency = 4 + +query_cache_type = 1 +query_cache_limit = 1M +query_cache_size = 8M +general_log_file = /var/log/mysql/mysql.log +#general_log = 1 +log_error = /var/log/mysql/error.log + +slow_query_log = 1 +slow_query_log_file = /var/log/mysql/mysql-slow.log +long_query_time = 1 +#log-queries-not-using-indexes + + +#server-id = 1 +#log_bin = /var/log/mysql/mysql-bin.log +expire_logs_days = 14 +max_binlog_size = 1G +#binlog_do_db = include_database_name +#binlog_ignore_db = include_database_name + + +# ssl-ca=/etc/mysql/cacert.pem +# ssl-cert=/etc/mysql/server-cert.pem +# ssl-key=/etc/mysql/server-key.pem +innodb_data_file_path = ibdata1:128M:autoextend +innodb_file_per_table = 1 +skip-innodb_doublewrite +innodb_additional_mem_pool_size = 12M +innodb_buffer_pool_size = 256M +innodb_log_buffer_size = 8M +innodb_log_file_size = 8M +innodb_flush_log_at_trx_commit = 0 +innodb_flush_method = O_DIRECT +innodb_support_xa = OFF + + +[mysqldump] +quick +quote-names +max_allowed_packet = 16M + +[mysql] +#no-auto-rehash # faster start of mysql but no tab completition + +[isamchk] +key_buffer = 16M diff --git a/apps/mysql/8.0.30/docker-compose.yml b/apps/mysql/8.0.30/docker-compose.yml new file mode 100644 index 000000000..28ec6574c --- /dev/null +++ b/apps/mysql/8.0.30/docker-compose.yml @@ -0,0 +1,23 @@ +version: '3' + +services: + mysql8.0: + image: mysql:8.0.30 + container_name: ${CONTAINER_NAME} + restart: always + environment: + TZ: ${TZ} + MYSQL_DATABASE: ${DATABASE} + MYSQL_USER: ${USER} + MYSQL_PASSWORD: ${PASSWORD} + MYSQL_ROOT_PASSWORD: ${ROOT_PASSWORD} + ports: + - ${PORT}:3306 + volumes: + - ./data/:/var/lib/mysql + - ./conf/my.cnf:/etc/mysql/my.cnf + command: + --character-set-server=utf8mb4 + --collation-server=utf8mb4_general_ci + --explicit_defaults_for_timestamp=true + --lower_case_table_names=1 \ No newline at end of file diff --git a/apps/mysql/8.0.30/params.json b/apps/mysql/8.0.30/params.json new file mode 100644 index 000000000..5e4ce3d2f --- /dev/null +++ b/apps/mysql/8.0.30/params.json @@ -0,0 +1,52 @@ +{ + "formFields": [ + { + "type": "text", + "labelZh": "时区", + "labelEn": "TimeZone", + "required": true, + "default": "Asia/Shanghai", + "envKey": "TZ" + }, + { + "type": "text", + "labelZh": "数据库", + "labelEn": "Database", + "required": true, + "default": "db", + "envKey": "DATABASE" + }, + { + "type": "text", + "labelZh": "普通用户", + "labelEn": "User", + "required": true, + "default": "mysql", + "envKey": "USER" + }, + { + "type": "text", + "labelZh": "普通用户密码", + "labelEn": "Password", + "required": true, + "default": "1qaz@WSX", + "envKey": "PASSWORD" + }, + { + "type": "text", + "labelZh": "Root用户密码", + "labelEn": "RootPassword", + "required": true, + "default": "1panel@mysql", + "envKey": "ROOT_PASSWORD" + }, + { + "type": "number", + "labelZh": "端口", + "labelEn": "Port", + "required": true, + "default": 3306, + "envKey": "PORT" + } + ] +} \ No newline at end of file diff --git a/backend/app/repo/app_install.go b/backend/app/repo/app_install.go index 2830bc9cd..deafa72e2 100644 --- a/backend/app/repo/app_install.go +++ b/backend/app/repo/app_install.go @@ -17,7 +17,7 @@ func (a AppInstallRepo) GetBy(opts ...DBOption) ([]model.AppInstall, error) { return install, err } -func (a AppInstallRepo) Create(install model.AppInstall) error { +func (a AppInstallRepo) Create(install *model.AppInstall) error { db := global.DB.Model(&model.AppInstall{}) return db.Create(&install).Error } diff --git a/backend/app/service/app.go b/backend/app/service/app.go index 410003a0e..f16ce9be9 100644 --- a/backend/app/service/app.go +++ b/backend/app/service/app.go @@ -242,7 +242,7 @@ func (a AppService) Install(name string, appDetailId uint, params map[string]int if err := godotenv.Write(envParams, envPath); err != nil { return err } - if err := appInstallRepo.Create(appInstall); err != nil { + if err := appInstallRepo.Create(&appInstall); err != nil { return err } go upApp(composeFilePath, appInstall) diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 2fc1f5668..6e8e984dd 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -61,6 +61,7 @@ export default { createSuccess: 'Create Success', updateSuccess: 'Update Success', uploadSuccess: 'Update Success', + operate: 'Operate', }, login: { captchaHelper: 'Please enter the verification code', @@ -397,8 +398,21 @@ export default { description: 'A modern Linux panel tool', }, app: { - installed: 'Installed', - all: 'All', - version: 'Version', + installed: 'installed', + all: 'all', + version: 'version', + detail: 'detail', + install: 'install', + author: 'author', + source: 'source', + sync: 'sync', + appName: 'App Name', + status: 'status', + container: 'container', + restart: 'restart', + up: 'start', + down: 'stop', + name: 'name', + description: 'description', }, }; diff --git a/frontend/src/views/app-store/detail/install.vue b/frontend/src/views/app-store/detail/install.vue index 24feae2ca..d078061c5 100644 --- a/frontend/src/views/app-store/detail/install.vue +++ b/frontend/src/views/app-store/detail/install.vue @@ -1,8 +1,8 @@