Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
hengli
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
deploy
hengli
Commits
8ca5dd50
Commit
8ca5dd50
authored
Sep 30, 2022
by
吴文龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new
parent
79161670
Pipeline
#106331
canceled with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
6 deletions
+19
-6
docker-compose-dbapi.yml
docker-compose-dbapi.yml
+1
-1
docker-compose-mysql.yml
docker-compose-mysql.yml
+18
-5
No files found.
docker-compose-dbapi.yml
View file @
8ca5dd50
...
...
@@ -5,7 +5,7 @@ services:
container_name
:
htwin-dbapi
environment
:
-
DB_URL=jdbc:mysql://mysql8:3306/htwin_dbapi?useSSL=false&characterEncoding=UTF-8&serverTimezone=GMT%2B8
-
DB_USERNAME=
root
-
DB_USERNAME=
huansi
-
DB_PASSWORD=huansi.net
-
DB_DRIVER=com.mysql.cj.jdbc.Driver
-
IOT_TWINBORN_FILE_LOCATION=/upload
...
...
docker-compose-mysql.yml
View file @
8ca5dd50
...
...
@@ -2,11 +2,24 @@ version: "3"
services
:
mysql8
:
image
:
mysql:8.0.26
restart
:
always
container_name
:
mysql8
ports
:
-
"
3306:3306"
command
:
# MySQL8的密码验证方式默认是 caching_sha2_password,但是很多的连接工具还不支持该方式
# 就需要手动设置下mysql的密码认证方式为以前的 mysql_native_password 方式
--default-authentication-plugin=mysql_native_password
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--lower-case-table-names=1
# 设置表名大小写不敏感
# docker的重启策略:在容器退出时总是重启容器,但是不考虑在Docker守护进程启动时就已经停止了的容器
restart
:
unless-stopped
environment
:
MYSQL_ROOT_PASSWORD
:
'
huansi.net'
MYSQL_ROOT_PASSWORD
:
huansi@hengli
# root用户的密码
MYSQL_USER
:
huansi
# 创建新用户
MYSQL_PASSWORD
:
huansi.net
# 新用户的密码
TZ
:
Asia/Shanghai
ports
:
-
3306:3306
volumes
:
-
"
./mysql:/var/lib/mysql"
\ No newline at end of file
-
./mysql/data:/var/lib/mysql
-
./mysql/conf:/etc/mysql/conf.d
-
./mysql/logs:/logs
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment