Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with SMB Share #126

Closed
avilabss opened this issue Jan 1, 2024 · 1 comment · Fixed by #180
Closed

Issues with SMB Share #126

avilabss opened this issue Jan 1, 2024 · 1 comment · Fixed by #180
Labels
enhancement New feature or request

Comments

@avilabss
Copy link

avilabss commented Jan 1, 2024

+ 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 }}
@Forceu
Copy link
Owner

Forceu commented Jul 7, 2024

Added in b56970b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants