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
|
return
|
||||||
}
|
}
|
||||||
//app.Send(target, "Downloaded.", msg)
|
//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)
|
f, err := os.Create(fileName)
|
||||||
//app.Send(target, fmt.Sprintf("Filename: %s", fileName), msg)
|
//app.Send(target, fmt.Sprintf("Filename: %s", fileName), msg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -86,8 +86,10 @@ func (app *application) ConvertAndSave(fName, link string, msg twitch.PrivateMes
|
||||||
Output(out).
|
Output(out).
|
||||||
OverWriteOutput().ErrorToStdOut().Run()
|
OverWriteOutput().ErrorToStdOut().Run()
|
||||||
|
|
||||||
|
defer os.Remove(fileName)
|
||||||
app.Send(msg.Channel, fmt.Sprintf("https://bot.noury.is/uploads/%s.mp4", fName), msg)
|
app.Send(msg.Channel, fmt.Sprintf("https://bot.noury.is/uploads/%s.mp4", fName), msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (app *application) ConvertToMP4(link string, msg twitch.PrivateMessage) {
|
func (app *application) ConvertToMP4(link string, msg twitch.PrivateMessage) {
|
||||||
goutubedl.Path = "yt-dlp"
|
goutubedl.Path = "yt-dlp"
|
||||||
uuid_og := uuid.NewString()
|
uuid_og := uuid.NewString()
|
||||||
|
|
|
@ -10,12 +10,13 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- data:/var/lib/postgresql/data
|
- data:/var/lib/postgresql/data
|
||||||
nourybot:
|
nourybot:
|
||||||
|
user: "1000:1000"
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
env_file: .env
|
env_file: .env
|
||||||
volumes:
|
volumes:
|
||||||
- "./public/uploads:/public/uploads"
|
- "./public/uploads/:/public/uploads"
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:42069:8080"
|
- "127.0.0.1:42069:8080"
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|
Loading…
Reference in a new issue