fix docker permission denied

This commit is contained in:
lyx0 2023-12-19 23:16:53 +01:00
parent 4422e49ea0
commit f8e157fe91
2 changed files with 5 additions and 2 deletions

View file

@ -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()

View file

@ -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: