SSH TEstg
This commit is contained in:
parent
2aada6342c
commit
e1307d17ca
2 changed files with 18 additions and 2 deletions
13
.drone.yml
13
.drone.yml
|
@ -14,4 +14,15 @@ steps:
|
||||||
repo: kekskurse/kuvia
|
repo: kekskurse/kuvia
|
||||||
username: kekskurse
|
username: kekskurse
|
||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
|
- name: ssh commands
|
||||||
|
image: appleboy/drone-ssh
|
||||||
|
settings:
|
||||||
|
host: green.keks.cloud
|
||||||
|
username: kekskurse
|
||||||
|
port: 65223
|
||||||
|
key:
|
||||||
|
from_secret: ssh_key
|
||||||
|
script:
|
||||||
|
- echo hello
|
||||||
|
- echo world
|
7
main.go
7
main.go
|
@ -22,6 +22,7 @@ import (
|
||||||
"kuvia/pkg/globaleuserdata"
|
"kuvia/pkg/globaleuserdata"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:embed public
|
//go:embed public
|
||||||
|
@ -117,9 +118,13 @@ func main() {
|
||||||
|
|
||||||
},
|
},
|
||||||
))
|
))
|
||||||
|
redisDB, err := strconv.Atoi(os.Getenv("REDIS_DB"))
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal().Err(err).Str("Redis DB String", os.Getenv("REDIS_DB")).Msg("Cant convertz Redis DB to int")
|
||||||
|
}
|
||||||
ro := redis.Options{
|
ro := redis.Options{
|
||||||
Addr: os.Getenv("REDIS_HORST"),
|
Addr: os.Getenv("REDIS_HORST"),
|
||||||
DB: os.Getenv("REDIS_DB").(int),
|
DB: redisDB,
|
||||||
}
|
}
|
||||||
f.Use(session.Sessioner(session.Options{
|
f.Use(session.Sessioner(session.Options{
|
||||||
Initer: sredis.Initer(),
|
Initer: sredis.Initer(),
|
||||||
|
|
Loading…
Reference in a new issue