Gokapi
Gokapi copied to clipboard
Issues with SMB Share
+ Issue
I'm deploying using docker-compose and trying to use SMB share to store all uploaded files. But this is impossible cause both the database and uploaded files are stored in /app/data resulting in locking issues with the database. It would be great if we could have a dedicated folder for uploaded files so we can mount a share if needed without touching the database.
I also played around with TMPDIR thinking I could maybe have uploads in a directory I specify here and simply mount SMB share there but I think that's not the purpose of this environment variable and it's just for storing data chunks during uploads, although please correct me if I'm wrong.
+ Error
Gokapi v1.8.0 starting
Saving new files to local storage
panic: database is locked (5) (SQLITE_BUSY)
goroutine 7 [running]:
github.com/forceu/gokapi/internal/helper.Check(...)
/compile/internal/helper/OS.go:62
github.com/forceu/gokapi/internal/configuration/database.GetAllMetadata()
/compile/internal/configuration/database/metadata.go:64 +0x478
github.com/forceu/gokapi/internal/storage.CleanUp(0x1)
/compile/internal/storage/FileServing.go:607 +0x85
created by main.main
/compile/cmd/gokapi/Main.go:56 +0x376
+ docker-compose.yml
# {{ ansible_managed }}
services:
gokapi:
image: f0rc3/gokapi:latest
container_name: gokapi
restart: always
volumes:
- ./Gokapi:/app/data
- ./config:/app/config
ports:
- 53842:53842
environment:
- PUID={{ ansible_uid }}
- PGID={{ ansible_gid }}
- TZ={{ container_timezone }}