nostr-rs-relay
nostr-rs-relay copied to clipboard
"unable to open database file" using docker compose
Hi, having some issues getting the relay deployed while using docker compose:
version: "3.7"
services:
public-relay:
image: scsibug/nostr-rs-relay
restart: on-failure
user: "1000:1000" #Tried with and without this
volumes:
- /home/huw/docker-files/nostrrelay/config.toml:/usr/src/app/config.toml
- /home/huw/docker-files/nostrrelay/db:/usr/src/app/db:Z
labels:
- "traefik.enable=true"
- "traefik.http.routers.nostr.entrypoints=websecure"
- "traefik.http.routers.nostr.rule=Host(`nostr.ussenterprise.xyz`)"
- "traefik.http.routers.nostr.tls=true"
- "traefik.http.routers.nostr.tls.certresolver=letls"
networks:
- cloudflaretunnel
networks:
cloudflaretunnel:
external: true
When it spins up I get the error: unable to open database file: /usr/src/app/db/nostr.db
I've tried creating it manually on both sides and not creating it at all but not luck.
Any suggestions? Thanks!
The problem may be associated with the relay database volume. You could try creating a docker volume for the nostr-relay database.
the file would be like this
version:` "3.7"
services:
public-relay:
image: scsibug/nostr-rs-relay
restart: on-failure
user: "1000:1000" #Tried with and without this
volumes:
- /home/huw/docker-files/nostrrelay/config.toml:/usr/src/app/config.toml
- nostrrelay_db:/usr/src/app/db:Z
labels:
- "traefik.enable=true"
- "traefik.http.routers.nostr.entrypoints=websecure"
- "traefik.http.routers.nostr.rule=Host(`nostr.ussenterprise.xyz`)"
- "traefik.http.routers.nostr.tls=true"
- "traefik.http.routers.nostr.tls.certresolver=letls"
networks:
- cloudflaretunnel
volumes:
nostrrelay_db:
networks:
cloudflaretunnel:
external: true
I had the same issue, just not with docker-compose but plain docker. It was a permissions issue for the folder from where my data was mounted. Changing the perms fixed the problem