This is the collection service of newsbot to pull articles from the web.
James Tombleson
66c74802d9
* trying a different method to have rod find to brower on disk for docker * updated rod to find the browser on disk. This is for docker support |
||
---|---|---|
.github/workflows | ||
.vscode | ||
database | ||
docs | ||
domain | ||
routes | ||
services | ||
.gitignore | ||
docker-compose.yaml | ||
Dockerfile | ||
go.mod | ||
go.sum | ||
main.go | ||
makefile | ||
README.md | ||
sqlc.yaml |
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