From f5ad06e110f0fd63af75cee9e31211a64a76a508 Mon Sep 17 00:00:00 2001 From: Fedorov Vladimir Date: Sat, 11 Mar 2023 14:07:42 +0700 Subject: [PATCH] update --- .drone.yml | 23 ++++++++++++----------- .fleet/run.json | 12 ++++++++++++ config/config.go | 2 +- 3 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 .fleet/run.json diff --git a/.drone.yml b/.drone.yml index 003c18e..7125001 100644 --- a/.drone.yml +++ b/.drone.yml @@ -12,14 +12,15 @@ steps: image: appleboy/drone-scp settings: host: - from_secret: ssh_ip + from_secret: server_ip username: - from_secret: ssh_login - password: - from_secret: ssh_pass + from_secret: ssh_user + key: + from_secret: ssh_key port: from_secret: ssh_port - target: bots/butler_tg_bot + target: + - deploys/butler_tg_bot source: - butler_tg_bot rm: true @@ -33,19 +34,19 @@ steps: from_secret: ssh_pass settings: host: - from_secret: ssh_ip + from_secret: server_ip username: - from_secret: ssh_login - password: - from_secret: ssh_pass + from_secret: ssh_user + key: + from_secret: ssh_key port: from_secret: ssh_port envs: [ TOKEN,PASSWORD ] command_timeout: 10s script: - - cd bots/butler_tg_bot + - cd deploys/butler_tg_bot - echo $${TOKEN} > token.txt - - echo $${PASSWORD} | sudo -S systemctl restart butler_tg_bot + - echo $${PASSWORD} | sudo -S systemctl restart butler trigger: event: diff --git a/.fleet/run.json b/.fleet/run.json new file mode 100644 index 0000000..b7c0633 --- /dev/null +++ b/.fleet/run.json @@ -0,0 +1,12 @@ +{ + "configurations": [ + { + "type": "go", + "name": "run", + "goExecPath": "/usr/local/go/bin/go", + "buildParams": [ + "$PROJECT_DIR$/main.go" + ], + }, + ] +} \ No newline at end of file diff --git a/config/config.go b/config/config.go index 4c89759..770cfc6 100644 --- a/config/config.go +++ b/config/config.go @@ -8,7 +8,7 @@ type Config struct { func NewConfig() *Config { return &Config{ - MongoURL: "mongodb://mongo:o6bbyog3DHG0GYdu@90.189.218.191:27027", + MongoURL: "mongodb://mongo:o6bbyog3DHG0GYdu@158.160.11.219:27027", DBName: "butler", ChatsCollectionName: "chats", }