From 1a335261142f1230c413020170bcbddfa1c939ce Mon Sep 17 00:00:00 2001 From: BennyThink Date: Fri, 13 Aug 2021 12:44:48 +0800 Subject: [PATCH] fix onekey install.sh close #50 --- docker-compose.yml | 28 +++++++++++++++------------- scripts/install.sh | 5 ++--- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0cafc30..7cd3c7c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,16 +22,6 @@ services: - /var/run/docker.sock:/var/run/docker.sock entrypoint: [ "socat", "tcp-listen:2375,fork,reuseaddr","unix-connect:/var/run/docker.sock" ] - yyets-web: - image: bennythink/yyetsbot - restart: unless-stopped - environment: - - mongo=mongo - working_dir: /YYeTsBot/yyetsweb/ - volumes: - - ./data:/YYeTsBot/yyetsweb/data/ - command: [ "python3","server.py","-h=0.0.0.0" ] - yyets-bot: image: bennythink/yyetsbot depends_on: @@ -51,7 +41,19 @@ services: - ./certs/:/etc/nginx/certs/ - ./logs:/var/log/nginx/ ports: - - 80:80 - - 443:443 + - "80:80" + - "443:443" environment: - TZ: Asia/Shanghai \ No newline at end of file + TZ: Asia/Shanghai + + yyets-web: + image: bennythink/yyetsbot + restart: unless-stopped + environment: + - mongo=mongo + working_dir: /YYeTsBot/yyetsweb/ + volumes: + - ./data:/YYeTsBot/yyetsweb/data/ + command: [ "python3","server.py","-h=0.0.0.0" ] + ports: + - "127.0.0.1:8888:8888" \ No newline at end of file diff --git a/scripts/install.sh b/scripts/install.sh index f4aa3b3..0c8f9db 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -23,8 +23,7 @@ function prepare() { function prepare_compose() { echo "[2/5] 下载docker-compose.yaml" curl -o docker-compose.yaml https://raw.githubusercontent.com/tgbot-collection/YYeTsBot/master/docker-compose.yml - sed -i '37,59d' docker-compose.yaml - sed -i '18,23d' docker-compose.yaml + sed -i '18,47d' docker-compose.yaml sed -i 's/127.0.0.1/0.0.0.0/' docker-compose.yaml } @@ -53,7 +52,7 @@ function import_db() { function up() { echo "[5/5] 启动中……" docker-compose up -d - echo "部署成功。您可以访问 http://127.0.0.1:8888 查看" + echo "部署成功。您可以访问 http://IP:8888 查看" } function deploy() {