This commit is contained in:
Владимир Фёдоров 2023-03-11 14:07:42 +07:00
parent 44152d7a8d
commit f5ad06e110
3 changed files with 25 additions and 12 deletions

View File

@ -12,14 +12,15 @@ steps:
image: appleboy/drone-scp image: appleboy/drone-scp
settings: settings:
host: host:
from_secret: ssh_ip from_secret: server_ip
username: username:
from_secret: ssh_login from_secret: ssh_user
password: key:
from_secret: ssh_pass from_secret: ssh_key
port: port:
from_secret: ssh_port from_secret: ssh_port
target: bots/butler_tg_bot target:
- deploys/butler_tg_bot
source: source:
- butler_tg_bot - butler_tg_bot
rm: true rm: true
@ -33,19 +34,19 @@ steps:
from_secret: ssh_pass from_secret: ssh_pass
settings: settings:
host: host:
from_secret: ssh_ip from_secret: server_ip
username: username:
from_secret: ssh_login from_secret: ssh_user
password: key:
from_secret: ssh_pass from_secret: ssh_key
port: port:
from_secret: ssh_port from_secret: ssh_port
envs: [ TOKEN,PASSWORD ] envs: [ TOKEN,PASSWORD ]
command_timeout: 10s command_timeout: 10s
script: script:
- cd bots/butler_tg_bot - cd deploys/butler_tg_bot
- echo $${TOKEN} > token.txt - echo $${TOKEN} > token.txt
- echo $${PASSWORD} | sudo -S systemctl restart butler_tg_bot - echo $${PASSWORD} | sudo -S systemctl restart butler
trigger: trigger:
event: event:

12
.fleet/run.json Normal file
View File

@ -0,0 +1,12 @@
{
"configurations": [
{
"type": "go",
"name": "run",
"goExecPath": "/usr/local/go/bin/go",
"buildParams": [
"$PROJECT_DIR$/main.go"
],
},
]
}

View File

@ -8,7 +8,7 @@ type Config struct {
func NewConfig() *Config { func NewConfig() *Config {
return &Config{ return &Config{
MongoURL: "mongodb://mongo:o6bbyog3DHG0GYdu@90.189.218.191:27027", MongoURL: "mongodb://mongo:o6bbyog3DHG0GYdu@158.160.11.219:27027",
DBName: "butler", DBName: "butler",
ChatsCollectionName: "chats", ChatsCollectionName: "chats",
} }