SSH TEstg
This commit is contained in:
parent
2aada6342c
commit
e1307d17ca
2 changed files with 18 additions and 2 deletions
11
.drone.yml
11
.drone.yml
|
@ -15,3 +15,14 @@ steps:
|
||||||
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