Open qbatten opened 2 years ago
Oh I don't have perms to PR. Here's my amended version of the Docker Run section of the README:
Run a local copy with these commands:
git clone https://github.com/tabledog/datasette-stripe && cd datasette-stripe
docker build . -t datasette-stripe
docker run -it -e NODE_ENV='development' -e STRIPE_SECRET_KEY='rk_test...' -v `pwd`/host/data:/data -p 3000:3000 datasette-stripe
You will now have:
http://127.0.0.1:3000
(use HTTPS in production)./host/data/stripe.sqlite
(fully populating the database may take a while).Go to http://127.0.0.1:3000, where you'll be prompted for a login. Enter your Stripe API key in the username field and leave the password field blank. Now you should be able to view the Datasette UI!
Note: Populating the database may take a while because of Stripe's API rate limits. You can watch the tdog logs as it fetches your data at /host/data/logs/tdog.txt
.
This is an awesome project, thanks for creating it!
Summary
I ran into some small confusion when trying to run it locally and wanted to share my solutions and maybe add a few sentences to the documentation.
Below I'll discuss the details of the docker command issue. I'll also push a PR that makes these little changes to the README. If you're not taking contributions right now I totally understand, just figured I'd throw it out there in case it's useful. Again, this project is awesome!
Details of the docker run cmd issue
Here's the message I got when entering that docker cmd:
I tried adding the host & host/data folders in File Sharing, as suggested by the error message, but that didn't resolve. Eventually I figured out that passing an absolute path to the -v flag resolved the issue. So the new version of the command that I propose is:
docker run -it -e NODE_ENV='development' -e STRIPE_SECRET_KEY='rk_test...' -v `pwd`/host/data:/data -p 3000:3000 datasette-stripe
. This expands pwd and results in an absolute path.