Skip to content

PeterHovanec/NewsDigest

Repository files navigation

News Digest


Requirements

  • Docker and Docker Compose (v2+)

Setup

1. Clone the repository

git clone <your-repo-url>
cd NewsDigest

2. Create the .env file

Copy the example environment file to .env.

On macOS / Linux:

cp .env.example .env

On Windows (PowerShell):

Copy-Item .env.example .env

On Windows (Command Prompt):

copy .env.example .env

Then open .env and fill in your values:

DJANGO_SECRET_KEY=replace-with-a-random-string
DJANGO_DEBUG=1
DJANGO_ALLOWED_HOSTS=127.0.0.1,localhost
POSTGRES_DB=digests
POSTGRES_USER=digests
POSTGRES_PASSWORD=
POSTGRES_HOST=db
POSTGRES_PORT=5432
REDIS_URL=redis://redis:6379/0
TIME_ZONE=Europe/Bratislava

3. Build and start all services

docker compose up --build

This starts:

  • db (Postgres)
  • redis
  • web (Django)
  • worker (Celery worker)
  • beat (Celery scheduler)

4. Apply database migrations

docker compose exec web python manage.py migrate

5. Create an admin user

docker compose exec web python manage.py createsuperuser

Follow the prompts to set your username, email, and password.


6. Open the admin panel

Visit http://127.0.0.1:8000/admin
Log in with your admin credentials.


7. Add a news source

Example entry:

Name: Planet Python
RSS URL: https://planetpython.org/rss20.xml
Active: ✓

8. Fetch articles

Celery Beat will run automatically every 10 seconds.


Stopping the app

docker compose down

Your database is persisted in the Docker volume db_data.


Logs

Follow logs for individual services:

docker compose logs -f web
docker compose logs -f worker
docker compose logs -f beat

Notes

  • Data persists automatically in the Postgres volume.

About

A small Django app created for AnimalSoft, s. r. o.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published