diff --git a/README.md b/README.md index 3ecc6b3..7bfa330 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,20 @@ -PushFish API [![License](http://img.shields.io/badge/license-BSD-blue.svg?style=flat)](/LICENSE) -================== -This is the core for PushFish. It manages the whole shebang. +# PushFish API [![License](http://img.shields.io/badge/license-BSD-blue.svg?style=flat)](/LICENSE) +This is the core for PushFish. It manages the whole shebang. ## Configuration + The pushfish API server reads various options from a configuration file. This configuration file can be specified by setting the environment variable `PUSHROCKET_CONFIG`. If this variable is not set, then the file is searched for in a default path. -``` - ~/.config/pushfish-api/pushfish-api.cfg # on Linux +```bash + ~/.config/pushfish-api/pushfish-api.cfg # on Linux %APPDATA%\pushfish-api\pushfish-api.cfg # on Windows ~/Library/Application Support/pushfish-api/pushfish-api.cfg # on OSX ``` where the value for "user" will be changed to your current username. If this file does not exist, then the API server will generate a default configuration, which looks like this: -``` +```cfg [database] #for mysql, use something like: #uri = 'mysql+pymysql://pushfish@localhost/pushfish_api?charset=utf8mb4' @@ -23,10 +23,10 @@ where the value for "user" will be changed to your current username. If this fil uri = sqlite:////home/pushfish/.local/share/pushfish-api/pushfish-api.db [dispatch] -google_api_key = +google_api_key = google_gcm_sender_id = 509878466986 #point this at the pushfish-connectors zeroMQ pubsub socket -zeromq_relay_uri = +zeromq_relay_uri = [server] #set to 0 for production mode @@ -36,22 +36,15 @@ debug = 1 the format of the database URI is an SQLAlchemy URL as [described here](http://docs.sqlalchemy.org/en/latest/core/engines.html) -Docker ------------------- -Build the image: +## Docker -``` +```bash +#Build the image docker build -t pushfish-api:latest . -``` -Run: +#Run +docker run pushfish-api:latest -``` -docker run pushfish-api:latest -``` - -Run tests.py: - -``` +#Run tests.py: (optional) docker run pushfish-api:latest python tests.py ```