diff --git a/README.md b/README.md index 9e8b11d..9987bc8 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,9 @@ git clone https://github.com/nineaiyu/FlyApps ``` -### FlyApp 服务器搭建 [python3 环境] +### [Docker 部署](./docker.md) + +### FlyApp 本地部署 [python3 环境] ##### 搭建python env 环境 ```shell @@ -41,7 +43,7 @@ python manage.py migrate ```shell yum install openssl-devel -y yum install gcc-c++ gcc -y -wget https://github.com/nineaiyu/zsign/archive/refs/tags/v1.1.2.tar.gz + tar xvf v1.1.2.tar.gz cd zsign-1.1.2/ g++ *.cpp common/*.cpp -lcrypto -O3 -std=c++11 -o zsign @@ -53,7 +55,7 @@ cp zsign /usr/bin/ ```shell yum install npm npm install -g n -n 12.13 # 安装12版本的node ,最新版本会有问题 +n 12.13 # 安装12版本的node或者14版本 ,最新版本会有问题 npm install -g yarn ``` diff --git a/build.sh b/build.sh index 6967e14..33e6455 100644 --- a/build.sh +++ b/build.sh @@ -7,6 +7,6 @@ s_path=`pwd` #first build fir_client docker pull node:14.17.3 \cp -a build_client.sh fir_client/ -docker run --rm -v "${s_path}"/fir_client:/fir_client -it node:14.17.3 sh /fir_client/build_client.sh +docker run --rm --privileged=true -v "${s_path}"/fir_client:/fir_client -it node:14.17.3 sh /fir_client/build_client.sh cd "${s_path}"/fir_ser/ && docker build . -t flyapps diff --git a/fir_ser/config.py b/fir_ser/config.py index 2833146..5246b55 100644 --- a/fir_ser/config.py +++ b/fir_ser/config.py @@ -34,7 +34,7 @@ class BASECONF(object): # When Django start it will bind this host and port # ./manage.py runserver 127.0.0.1:8080 # uwsgi运行时绑定端口 - SERVER_BIND_HOST = '127.0.0.1' + SERVER_BIND_HOST = '0.0.0.0' SERVER_LISTEN_PORT = 8898 # celery flower 任务监控配置 @@ -68,7 +68,7 @@ class DBCONF(object): """ mysql数据库信息 """ - host = 'mysql' # 可以通过主机名进行通信,如果是本地部署,可填写 127.0.0.1 + host = 'mariadb' # 可以通过主机名进行通信,如果是本地部署,可填写 127.0.0.1 port = '3306' password = 'KGzKjZpWBp4R4RSa' user = 'flyuser' @@ -81,7 +81,7 @@ class CACHECONF(object): """ host = 'redis' # 可以通过主机名进行通信,如果是本地部署,可填写 127.0.0.1 port = '6379' - password = '' + password = 'nineven' # 微信公众号登录配置 diff --git a/fir_ser/zsign-1.1.2.tar.gz b/fir_ser/zsign-1.1.2.tar.gz index 4c593b0..de27a02 100644 Binary files a/fir_ser/zsign-1.1.2.tar.gz and b/fir_ser/zsign-1.1.2.tar.gz differ diff --git a/start.sh b/start.sh index 1feea34..ad1e22c 100644 --- a/start.sh +++ b/start.sh @@ -25,8 +25,8 @@ while [ ${code} -ne 0 ];do echo "check whether mysql service is ready..." done -docker exec -it mariadb mysql -proot -e 'create database flyapp default character set utf8 COLLATE utf8_general_ci;' -docker exec -it mariadb mysql -proot -e "grant all on flyapp.* to flyuser@'%' identified by 'KGzKjZpWBp4R4RSa';" +docker exec -it mariadb mysql -proot -e 'create database flyappnew default character set utf8 COLLATE utf8_general_ci;' +docker exec -it mariadb mysql -proot -e "grant all on flyappnew.* to flyuser@'%' identified by 'KGzKjZpWBp4R4RSa';" docker run --sysctl net.core.somaxconn=4096 --net flyapps \