Skip to content
This repository was archived by the owner on Nov 2, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 14 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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
Expand All @@ -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
```