SinTan1729 / chhoto-url

A simple, blazingly fast, selfhosted URL shortener with no unnecessary features; written in Rust.
https://hub.docker.com/r/sintan1729/chhoto-url
MIT License
142 stars 15 forks source link

"unable to open database file: urls.sqlite" on latest (5.4.4) #32

Closed sakkarose closed 3 weeks ago

sakkarose commented 3 weeks ago

Describe the bug

thread 'actix-rt|system:0|arbiter:0' panicked at src/database.rs:82:37:
Unable to open database!: SqliteFailure(Error { code: CannotOpen, extended_code: 14 }, Some("unable to open database file: urls.sqlite"))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at /cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-server-2.5.0/src/worker.rs:476:27:
called `Result::unwrap()` on an `Err` value: RecvError

To Reproduce Composing with latest image.

Expected behavior The app starts normally.

Screenshots If applicable, add screenshots to help explain your problem.

Which version of Chhoto-URL are you experiencing the problem on? latest (5.4.4)

Can you reproduce the issue in the latest version? Yes (It starts in the latest version).

Additional context My docker-compose

services:
    chhoto-url:
        image: sintan1729/chhoto-url:latest
        restart: unless-stopped
        container_name: chhoto-url
        ports:
            - 4567:4567
        environment:
            - site_url=https://...
            - password=...
            - redirect_method=TEMPORARY
            - slug_style=Pair
            - slug_length=8
            - public_mode=Disable
            - cache_control_header=no-cache, private
        volumes:
            - db:/urls.sqlite

volumes:
    db:
SinTan1729 commented 3 weeks ago

Have you looked at #31?

sakkarose commented 3 weeks ago

Ty, I will check and get back to u.

sakkarose commented 3 weeks ago

Yeah I choose to use a persistent db outside volume, give permissions and it works. Tysm