This is the collection service of newsbot to pull articles from the web.
Go to file
snyk-bot ef69b92c44
fix: Dockerfile to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-ALPINE318-OPENSSL-5776808
- https://snyk.io/vuln/SNYK-ALPINE318-OPENSSL-5776808
- https://snyk.io/vuln/SNYK-ALPINE318-OPENSSL-5788370
- https://snyk.io/vuln/SNYK-ALPINE318-OPENSSL-5788370
- https://snyk.io/vuln/SNYK-ALPINE318-OPENSSL-5821142
2023-08-08 21:59:55 +00:00
.github/workflows removing build from merge. Only needed for PR (#28) 2022-08-21 20:06:01 -07:00
.vscode Getting the basics setup for the collector. It can pull reddit json and almost post the db api 2022-04-02 12:05:32 -07:00
database bySourceId now supports paging and defaults to newest items (#41) 2023-02-04 21:43:07 -08:00
docs bySourceId now supports paging and defaults to newest items (#41) 2023-02-04 21:43:07 -08:00
domain Features/delete source and first dto (#36) 2023-01-22 10:12:55 -08:00
dto bySourceId now supports paging and defaults to newest items (#41) 2023-02-04 21:43:07 -08:00
routes bySourceId now supports paging and defaults to newest items (#41) 2023-02-04 21:43:07 -08:00
services Features/delete source and first dto (#36) 2023-01-22 10:12:55 -08:00
.gitignore Features/subscription/features for portal (#34) 2022-12-04 08:49:17 -08:00
Dockerfile fix: Dockerfile to reduce vulnerabilities 2023-08-08 21:59:55 +00:00
README.md Feature/dynamic swagger uri (#15) 2022-07-14 09:59:55 -07:00
docker-compose.yaml Feature/dynamic swagger uri (#15) 2022-07-14 09:59:55 -07:00
go.mod Basic routes have been added (#10) 2022-06-19 22:02:44 -07:00
go.sum Basic routes have been added (#10) 2022-06-19 22:02:44 -07:00
main.go Features/delete source and first dto (#36) 2023-01-22 10:12:55 -08:00
makefile Basic routes have been added (#10) 2022-06-19 22:02:44 -07:00
sqlc.yaml Feature/sql (#8) 2022-06-08 21:17:08 -07:00

README.md

newsbot.collector.api

This is the collection service of newsbot to pull articles from the web.

Deployment

  1. Create a copy of the docker compose file and make it local
  2. Update the docker-compose.yaml with your secrets
  3. Run migrations 2. docker compose run api /app/goose -dir "/app/migrations" up
  4. Run app
    1. docker compose up -d
  5. Once the app is running go to the swagger page and validate that you see the seeded sources.
    1. http://localhost:8081/swagger/index.html#/Source/get_config_sources
    2. curl -X 'GET' 'http://localhost:8081/api/config/sources' -H 'accept: application/json'
  6. Add any new sources
  7. Add a Discord Web Hook
    1. curl -X 'POST' 'http://localhost:8081/api/discord/webhooks/new?url=WEBHOOKURL&server=SERVERNAME&channel=CHANNELNAME' -H 'accept: application/json' -d ''
  8. Create your subscription links
    1. 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