add more startup commentary
This commit is contained in:
@@ -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
|
||||
|
||||
# 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
|
||||
```
|
||||
|
||||
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
|
||||
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?)
|
||||
|
||||
* 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.
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user