Sami Basra
Sami Basra7mo ago

denokv self host

hey guys i am try to host denokv. i have deployed a docker using image ghcr.io/denoland/denokv with following env variables. AWS_ACCESS_KEY_ID=AKIAW.... AWS_SECRET_ACCESS_KEY=uid6Xj6.... AWS_REGION=ap-southeast-1 DENO_KV_ACCESS_TOKEN=PyS3MY.... DENO_KV_SQLITE_PATH=/data/denokv.sqlite DENO_KV_S3_BUCKET=db-testnet DENO_KV_S3_PREFIX=db/ I have tested db with my app it works fine. this is the log of container. [2024-06-01T19:14:14Z INFO denokv] Opened database at /data/denokv.sqlite. Batch timeout: None [2024-06-01T19:14:14Z INFO denokv] Listening on http://0.0.0.0:4512 but i don’t see any thing in S3 Bucket. i don’t know what i am missing.
3 Replies
Deno AI Helper
Deno AI Helper7mo ago
Hello! It's great to hear that you've successfully deployed a denokv Docker container and have it working with your app. Based on the logs you've provided, it seems like the denokv server is running and listening for connections, which is a good sign. However, regarding the S3 bucket not showing any data, it's important to note that simply setting the environment variables related to AWS and the S3 bucket does not automatically enable the backup or replication feature. To enable continuous backup or replication to an S3 bucket, you need to start the denokv server with specific flags that tell it to sync with S3. According to the documentation, you should use the --sync-from-s3 flag when starting the denokv server if you want to create a local replica that continually syncs with the data in the S3 bucket. Here's an example command from the documentation:
$ denokv --sqlite-path=./data.sqlite3 serve --sync-from-s3 --s3-bucket your-bucket --s3-prefix some-prefix/6aea9765-2b1e-41c7-8904-0bdcd70b21d3/
$ denokv --sqlite-path=./data.sqlite3 serve --sync-from-s3 --s3-bucket your-bucket --s3-prefix some-prefix/6aea9765-2b1e-41c7-8904-0bdcd70b21d3/
This command starts the denokv server and instructs it to sync data from the specified S3 bucket and prefix. However, this is for creating a read-only replica from an existing S3 backup. If you want to set up continuous backup to S3, you would need to configure your denokv server to push changes to the S3 bucket. This feature might require additional configuration or flags that are not directly mentioned in the logs you've provided or the snippet from the documentation. Please ensure that you are following the guide for running the standalone denokv server with the correct flags for S3 synchronization. If the documentation provides a guide for setting up continuous backup to S3, it would be beneficial to follow that guide closely. If you've
Deno AI Helper
Deno AI Helper7mo ago
already followed the documentation and are still facing issues, it might be helpful to check the following: 1. Ensure that the IAM user whose credentials you are using has the necessary permissions to write to the specified S3 bucket. 2. Verify that the S3 bucket name and prefix are correct and that there are no typos. 3. Check if there are any additional logs or error messages that might indicate why the data is not being pushed to the S3 bucket. Remember that the denokv server needs to be explicitly configured to perform backups to S3, and this usually involves more than just setting environment variables. 🦕
cococore
cococore6mo ago
was it solved finally?

Did you find this page helpful?