R
Railwayβ€’9mo ago
abdulrahman1s

Deploying KeyDB with Volume: Permission Denied Issue

Hello! I'm having trouble deploying keydb with a volume. It keeps giving me an error saying 'Permission denied /volume/path'. I tried setting RAILWAY_RUN_UID and checked the current user (which turned out to be root), but keydb still throws a permissions error. I also checked with ls -l / and confirmed that the volume exists. I even tried renaming it (changing volume path), but nothing worked. Can someone please help me fix this? Dockerfile:
FROM eqalpha/keydb

COPY keydb.conf /etc/keydb/keydb.conf

EXPOSE 6379

CMD ["keydb-server", "/etc/keydb/keydb.conf", "--requirepass", "$KEYDB_PASSWORD"]
FROM eqalpha/keydb

COPY keydb.conf /etc/keydb/keydb.conf

EXPOSE 6379

CMD ["keydb-server", "/etc/keydb/keydb.conf", "--requirepass", "$KEYDB_PASSWORD"]
No description
24 Replies
Percy
Percyβ€’9mo ago
Project ID: e7e1e017-50e4-4446-a724-45add00a40d2
abdulrahman1s
abdulrahman1sOPβ€’9mo ago
e7e1e017-50e4-4446-a724-45add00a40d2
Brody
Brodyβ€’9mo ago
what did you set RAILWAY_RUN_UID to?
abdulrahman1s
abdulrahman1sOPβ€’9mo ago
0 I've spent an hour searching for a solution, checking KeyDB docs, their Docker build images, everything. I'm feeling pretty hopeless about it. If you can manage to solve this issue, it would be wonderful.
Brody
Brodyβ€’9mo ago
where are you mounting the volume?
abdulrahman1s
abdulrahman1sOPβ€’9mo ago
/keydb_data
Brody
Brodyβ€’9mo ago
send the conf file please
abdulrahman1s
abdulrahman1sOPβ€’9mo ago
port 6379
storage-provider flash /keydb_data
save ""
logfile ""
maxmemory 100mb
maxmemory-policy allkeys-random
maxclients 10
loglevel notice
always-show-logo no
port 6379
storage-provider flash /keydb_data
save ""
logfile ""
maxmemory 100mb
maxmemory-policy allkeys-random
maxclients 10
loglevel notice
always-show-logo no
Brody
Brodyβ€’9mo ago
are these things configurable via environment variables?
abdulrahman1s
abdulrahman1sOPβ€’9mo ago
I don't think so. keydb can be configured via a config file or parameters passed to its executable as stated by their docs.
Brody
Brodyβ€’9mo ago
cool, will take a crack at this
Solution
Brody
Brodyβ€’9mo ago
abdulrahman1s
abdulrahman1sOPβ€’9mo ago
I made a small adjustment to the start command by adding "--storage-provider flash /volume/path", and it worked perfectly. Thanks a lot! You're awesome! I'm not sure what mistake I made, though. If you have any insights on what went wrong so I can avoid it next time, that would be fantastic.
Brody
Brodyβ€’9mo ago
why flash?
abdulrahman1s
abdulrahman1sOPβ€’9mo ago
I needed a cheaper alternative to Redis that still uses the Redis protocol. So, I discovered KeyDB on Flash, which saves on costs by limiting RAM usage and storing data on disk.
Brody
Brodyβ€’9mo ago
oh so with flash no data ever gets saved into memory
abdulrahman1s
abdulrahman1sOPβ€’9mo ago
KeyDB still uses RAM for hot keys, but you can control how much it uses by using the 'maxmemory' option.
Brody
Brodyβ€’9mo ago
what did you set the path for flash to?
abdulrahman1s
abdulrahman1sOPβ€’9mo ago
To the volume path
Brody
Brodyβ€’9mo ago
/data?
abdulrahman1s
abdulrahman1sOPβ€’9mo ago
I've changed the path to something else. I don't quite remember the reason. πŸ˜…
Brody
Brodyβ€’9mo ago
haha well please don't blame me if you lose data, i tested it as the template deploys and data did persist
abdulrahman1s
abdulrahman1sOPβ€’9mo ago
Will surly testing it before shipping to production. Thank you :D
Brody
Brodyβ€’9mo ago
no problem!
Want results from more Discord servers?
Add your server