Browse Source

add more startup commentary

test-message
Trent Larson 12 months ago
parent
commit
0c7a9524a7
  1. 8
      README.md
  2. BIN
      data/webpush.db.empty

8
README.md

@ -23,12 +23,16 @@ bzip2 -d py-push-server-amd-$PUSH_SERVER_VERSION.tar.bz2
sudo docker load -i py-push-server-amd-$PUSH_SERVER_VERSION.tar sudo docker load -i py-push-server-amd-$PUSH_SERVER_VERSION.tar
# start with an empty DB
cp data/webpush.db.empty py-push-server-db/webpush.db
# here's how to run it -- but if you're on production then look below about ADMIN_PASSWORD
sudo docker run -d -p 8900:3000 -v ~/py-push-server-db:/app/instance/data --name py-push-server-$PUSH_SERVER_VERSION py-push-server:amd-$PUSH_SERVER_VERSION sudo docker run -d -p 8900:3000 -v ~/py-push-server-db:/app/instance/data --name py-push-server-$PUSH_SERVER_VERSION py-push-server:amd-$PUSH_SERVER_VERSION
``` ```
On a production server for security (eg /web-push/generate_vapid): set an environment variable `ADMIN_PASSWORD` for permissions; one way is to add this to the `docker run` command: `-e ADMIN_PASSWORD=<anything secure>` On a production server for security (eg /web-push/generate_vapid): set an environment variable `ADMIN_PASSWORD` for permissions; one way is to add this to the `docker run` command: `-e ADMIN_PASSWORD=<anything secure>`
Finally, generate a new VAPID by hitting the `regenerate_vapid` endpoint with a POST, eg. `curl -X POST localhost:8080/web-push/regenerate_vapid` Finally, after it's started, generate a new VAPID by hitting the `regenerate_vapid` endpoint with a POST, eg. `curl -X POST localhost:8080/web-push/regenerate_vapid`
@ -278,3 +282,5 @@ Troubleshooting
* If you get "unable to open database file", you can provide the app.py with * If you get "unable to open database file", you can provide the app.py with
SQLALCHEMY_DATABASE_URI with `sqlite:////...` with the full path to the data/webpush.db file. SQLALCHEMY_DATABASE_URI with `sqlite:////...` with the full path to the data/webpush.db file.
(Why does the relative path of `sqlite:///...` not work for a relative path?) (Why does the relative path of `sqlite:///...` not work for a relative path?)
* Another potential problem with "unable to open database file" is the permissions on the directory or file with the DB, as set on the local volume that matches the docker `/app/instance/data` directory. Note that the user id in the Dockerfile is set to 1000; the `id` command will tell you the uid for your user, which should match.

BIN
data/webpush.db.empty

Binary file not shown.
Loading…
Cancel
Save