Skip to content

fix(server): use relative SQLite path so dev mode works without root#18

Open
Flo5k5 wants to merge 1 commit intom5stack:mainfrom
Flo5k5:fix/sqlite-relative-path
Open

fix(server): use relative SQLite path so dev mode works without root#18
Flo5k5 wants to merge 1 commit intom5stack:mainfrom
Flo5k5:fix/sqlite-relative-path

Conversation

@Flo5k5
Copy link
Copy Markdown

@Flo5k5 Flo5k5 commented Apr 22, 2026

The config.yaml shipped in the repo points the SQLite link at
/stackChan.sqlite (filesystem root). That works in the provided Alpine
Dockerfile, which sets WORKDIR=/app and runs as root, but it prevents
any non-root developer from starting ./StackChan locally: GoFrame fails
to open the DB file on boot because / is not writable.

Switching to ./stackChan.sqlite resolves to WORKDIR in both situations
(local go run / go build and the Docker container), so the stock
command "go build && ./StackChan" finally works out of the box.

The config.yaml shipped in the repo points the SQLite link at
/stackChan.sqlite (filesystem root). That works in the provided Alpine
Dockerfile, which sets WORKDIR=/app and runs as root, but it prevents
any non-root developer from starting ./StackChan locally: GoFrame fails
to open the DB file on boot because / is not writable.

Switching to ./stackChan.sqlite resolves to WORKDIR in both situations
(local go run / go build and the Docker container), so the stock
command "go build && ./StackChan" finally works out of the box.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant