* made the swagger uri based on env * updated swagger to reflect the dynamic uri * updated extamples
1.2 KiB
1.2 KiB
newsbot.collector.api
This is the collection service of newsbot to pull articles from the web.
Deployment
- Create a copy of the docker compose file and make it local
- Update the
docker-compose.yaml
with your secrets - Run migrations
2.
docker compose run api /app/goose -dir "/app/migrations" up
- Run app
docker compose up -d
- Once the app is running go to the swagger page and validate that you see the seeded sources.
http://localhost:8081/swagger/index.html#/Source/get_config_sources
curl -X 'GET' 'http://localhost:8081/api/config/sources' -H 'accept: application/json'
- Add any new sources
- Add a Discord Web Hook
curl -X 'POST' 'http://localhost:8081/api/discord/webhooks/new?url=WEBHOOKURL&server=SERVERNAME&channel=CHANNELNAME' -H 'accept: application/json' -d ''
- Create your subscription links
- This is a link between a source and a discord web hook. Without this, the app will not send a notification about new posts.
Errors
- pq: permission denied to create extension "uuid-ossp"
- Might need to grant your account
ALTER USER root WITH SUPERUSER;
to create the 'uuid-ossp' for uuid creations
- Might need to grant your account