mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-05 16:53:46 +08:00
docs: 增加容器部署文档
This commit is contained in:
2
docker/mysql/.gitignore
vendored
Normal file
2
docker/mysql/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
data/*
|
||||
logs/*
|
||||
32
docker/mysql/conf/my.cnf
Normal file
32
docker/mysql/conf/my.cnf
Normal file
@@ -0,0 +1,32 @@
|
||||
#
|
||||
# The MySQL database server configuration file.
|
||||
#
|
||||
# One can use all long options that the program supports.
|
||||
# Run program with --help to get a list of available options and with
|
||||
# --print-defaults to see which it would actually understand and use.
|
||||
#
|
||||
# For explanations see
|
||||
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
|
||||
|
||||
# Here is entries for some specific programs
|
||||
# The following values assume you have at least 32M ram
|
||||
|
||||
[mysqld]
|
||||
#
|
||||
# * Basic Settings
|
||||
#
|
||||
#user = mysql
|
||||
# pid-file = /var/run/mysqld/mysqld.pid
|
||||
# socket = /var/run/mysqld/mysqld.sock
|
||||
# port = 3306
|
||||
# datadir = /var/lib/mysql
|
||||
|
||||
|
||||
# If MySQL is running as a replication slave, this should be
|
||||
# changed. Ref https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_tmpdir
|
||||
# tmpdir = /tmp
|
||||
#
|
||||
# Instead of skip-networking the default is now to listen only on
|
||||
# localhost which is more compatible and is not less secure.
|
||||
bind-address = 0.0.0.0
|
||||
mysqlx-bind-address = 0.0.0.0
|
||||
19
docker/mysql/docker-compose.yaml
Normal file
19
docker/mysql/docker-compose.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
version: '3'
|
||||
services:
|
||||
# 后端 API 程序
|
||||
mysql:
|
||||
image: mysql:8.0.33
|
||||
container_name: chatgpt-plus-mysql
|
||||
command: --default-authentication-plugin=mysql_native_password
|
||||
restart: always
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=12345678
|
||||
ports:
|
||||
- "3307:3306"
|
||||
volumes:
|
||||
- ./conf/my.cnf:/etc/mysql/my.cnf
|
||||
- ./data:/var/lib/mysql
|
||||
- ./logs:/var/log/mysql
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user