mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
fix docker permission denied
This commit is contained in:
parent
4422e49ea0
commit
f8e157fe91
|
@ -55,7 +55,7 @@ func (app *application) ConvertAndSave(fName, link string, msg twitch.PrivateMes
|
|||
return
|
||||
}
|
||||
//app.Send(target, "Downloaded.", msg)
|
||||
fileName := fmt.Sprintf("%s.%s", uuid_og, rExt)
|
||||
fileName := fmt.Sprintf("/public/uploads/%s.%s", uuid_og, rExt)
|
||||
f, err := os.Create(fileName)
|
||||
//app.Send(target, fmt.Sprintf("Filename: %s", fileName), msg)
|
||||
if err != nil {
|
||||
|
@ -86,8 +86,10 @@ func (app *application) ConvertAndSave(fName, link string, msg twitch.PrivateMes
|
|||
Output(out).
|
||||
OverWriteOutput().ErrorToStdOut().Run()
|
||||
|
||||
defer os.Remove(fileName)
|
||||
app.Send(msg.Channel, fmt.Sprintf("https://bot.noury.is/uploads/%s.mp4", fName), msg)
|
||||
}
|
||||
|
||||
func (app *application) ConvertToMP4(link string, msg twitch.PrivateMessage) {
|
||||
goutubedl.Path = "yt-dlp"
|
||||
uuid_og := uuid.NewString()
|
||||
|
|
|
@ -10,12 +10,13 @@ services:
|
|||
volumes:
|
||||
- data:/var/lib/postgresql/data
|
||||
nourybot:
|
||||
user: "1000:1000"
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
env_file: .env
|
||||
volumes:
|
||||
- "./public/uploads:/public/uploads"
|
||||
- "./public/uploads/:/public/uploads"
|
||||
ports:
|
||||
- "127.0.0.1:42069:8080"
|
||||
depends_on:
|
||||
|
|
Loading…
Reference in a new issue