mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-05 00:33:47 +08:00
docs: 增加容器部署文档
This commit is contained in:
@@ -25,7 +25,8 @@ docker build -t chatgpt-plus-vue:$version -f dockerfile-vue ../
|
||||
# add tag for aliyum docker registry
|
||||
goImageId=`docker images |grep chatgpt-plus-go |grep $version |awk '{print $3}'`
|
||||
docker tag $goImageId registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-go:$version
|
||||
|
||||
echo $goImageId
|
||||
vueImageId=`docker images |grep chatgpt-plus-vue |grep $version |awk '{print $3}'`
|
||||
echo $vueImageId
|
||||
docker tag $vueImageId registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-vue:$version
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Listen = "0.0.0.0:5678"
|
||||
ProxyURL = "http://192.168.3.200:7777"
|
||||
MysqlDns = "root:12345678@tcp(192.168.3.200:3306)/chatgpt_plus?charset=utf8mb4&parseTime=True&loc=Local"
|
||||
ProxyURL = "http://127.0.0.1:7777"
|
||||
MysqlDns = "root:12345678@tcp(172.28.173.76:3307)/chatgpt_plus?charset=utf8mb4&parseTime=True&loc=Local"
|
||||
|
||||
[Session]
|
||||
SecretKey = "8k0c67y2or1n7kbmn1w1c86ygqscguoktuf9t524jm64ls585z8uibpdssiy128s"
|
||||
|
||||
@@ -35,7 +35,7 @@ server {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_pass http://192.168.3.200:6789; # 这里改成后端服务的内网 IP 地址
|
||||
proxy_pass http://172.28.173.76:6789; # 这里改成后端服务的内网 IP 地址
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,21 +5,18 @@ services:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-go:v3.0.1
|
||||
# image: chatgpt-plus-go:v3.0.1
|
||||
container_name: chatgpt-plus-go
|
||||
#build: ./
|
||||
restart: always
|
||||
# network_mode: host
|
||||
ports:
|
||||
- "6789:5678"
|
||||
volumes:
|
||||
- ./conf/config.toml:/var/www/app/config.toml
|
||||
|
||||
# 前端应用
|
||||
chatgpt-vue:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-vue:v3.0.1
|
||||
# image: chatgpt-plus-vue:v3.0.1
|
||||
container_name: chatgpt-plus-vue
|
||||
#build: ./
|
||||
restart: always
|
||||
# network_mode: host
|
||||
ports:
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
|
||||
@@ -12,4 +12,4 @@ RUN apt-get -qq update \
|
||||
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
|
||||
|
||||
# 容器启动时执行的命令
|
||||
CMD ["./chatgpt-v3-amd64-linux"]
|
||||
CMD ["./chatgpt-v3-amd64-linux", "--debug=false"]
|
||||
|
||||
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