Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
PhilippMatthes authored Jul 9, 2024
1 parent 0938d84 commit 716226b
Showing 1 changed file with 33 additions and 5 deletions.
38 changes: 33 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
# News Service
A microservice to create and publish news to the PrioBike app.
# priobike-news-service

A Django service that can be used to create/distribute news articles and send out push notifications.

This service is used in our app to keep users engaged with the PrioBike app after leaving for a longer time, notifying them of recent updates that may be worth to check out.

[Learn more about PrioBike](https://github.com/priobike)

## Quickstart

The easiest way to spin up a minimalistic setup with this service is to use the contained `docker-compose.yml`:

```
docker-compose up
```

## API

## WORKER REST-API Endpoints
- ```api/news```: Get all news articles
- optional query params:
- ```from```: Specifies the date(time) from which on new news articles shoud be returned.released on or before the ```from``` date(time).
Expand Down Expand Up @@ -79,9 +93,23 @@ A microservice to create and publish news to the PrioBike app.
}
```

## Development
## CLI

- Create local SQLLite database: ```poetry run python manage.py migrate```
- Create super user for Django admin panel: ```poetry run python manage.py createsuperuser```
- Start local development server: ```poetry run python manage.py runserver```
- Run tests: ```poetry run python manage.py test```


## What else to know

This service can be executed in two modes: **manager** and **worker** mode. The **worker** mode is made to hit requests from users and can be scaled horizontally. The **manager** mode is designed to be deployed once, coordinating the workers. In the news service, the manager is used to create news articles via the Django admin interface. After an article is created, the content of this article is sent to all workers in the docker network, from where clients can fetch the detailled contents of each news article.

## Contributing

We highly encourage you to open an issue or a pull request. You can also use our repository freely with the `MIT` license.

Every service runs through testing before it is deployed in our release setup. Read more in our [PrioBike deployment readme](https://github.com/priobike/.github/blob/main/wiki/deployment.md) to understand how specific branches/tags are deployed.

## Anything unclear?

Help us improve this documentation. If you have any problems or unclarities, feel free to open an issue.

0 comments on commit 716226b

Please sign in to comment.