Skip to content

rntk/rsstag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,112 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Steps to run:

1. Build js bundle

Option A: Using Docker (recommended for consistency)

cd static/js

docker run -it --rm -v `pwd`/../css:/css -v `pwd`:/app -w /app node:22 ./build.sh

Option B: Using local Node.js (faster for development)

cd static/js

# Install dependencies (first time only)
npm install

# Production build
npm run build

# Development build with source maps
npm run build:dev

# Development with auto-rebuild on file changes
npm run watch

# Development with live reload server (port 8886)
npm run dev

Note: This project uses Node.js 22. Use nvm use to switch to the correct version if you have nvm installed.

1a. Lint/format frontend JS with Docker

From static/js:

docker build -t rsstag-js-lint -f Dockerfile.lint .

Run linting and tests:

docker run --rm -v "$PWD":/workspace rsstag-js-lint npm run lint
docker run --rm -v "$PWD":/workspace rsstag-js-lint npm run test

Apply lint fixes (optional):

docker run --rm -v "$PWD":/workspace rsstag-js-lint npm run lint:fix

Check formatting:

docker run --rm -v "$PWD":/workspace rsstag-js-lint npm run format:check

If you prefer to use host networking for Docker-based checks, the commands also work with --network=host:

docker run --rm --network=host -v "$PWD":/workspace rsstag-js-lint npm run lint
docker run --rm --network=host -v "$PWD":/workspace rsstag-js-lint npm run test
docker run --rm --network=host -v "$PWD":/workspace rsstag-js-lint npm run format:check

Apply formatting (optional):

docker run --rm -v "$PWD":/workspace rsstag-js-lint npm run format

2. Prepare config files

Copy default.conf to rsscloud.conf.

Set fields:

db_host = mongodb

db_port = 27017.

3. Build the rsstag image

At the root of the project run:

docker build -t rsstag

3a. Lint/format with Docker

Build the lint container:

docker build -t rsstag-lint -f Dockerfile.lint .

Run lint + format checks:

docker run --rm -v "$PWD":/work -w /work rsstag-lint

Apply formatting (optional):

docker run --rm -v "$PWD":/work -w /work --entrypoint ruff rsstag-lint format .

Apply lint fixes (optional):

docker run --rm -v "$PWD":/work -w /work --entrypoint ruff rsstag-lint check --fix .

4. Run

At the root of the project run:

docker compose up

5. Open

Use browser to open http://127.0.0.1:8885

6. Run DB-backed tests

The integration-style test suites expect MongoDB on 127.0.0.1:8765.

Start the test database:

docker compose -f docker-compose.test.yml up -d

Run the worker-focused tests:

python3 -m unittest tests.test_worker_bootstrap tests.test_worker_external_loop tests.test_worker_registry_completeness tests.test_worker_dispatcher_init tests.test_worker_task_dispatch tests.test_worker_process_lifecycle tests.test_worker_classes_init

If MongoDB is already running on the host on 127.0.0.1:8765, you can run the tests in Docker with host networking instead of starting docker-compose.test.yml:

docker build -t rsstag-test -f Dockerfile.test .
docker run --rm --network=host -v "$PWD":/work -w /work rsstag-test \
  python3 -m unittest tests.test_worker_bootstrap tests.test_worker_external_loop tests.test_worker_registry_completeness tests.test_worker_dispatcher_init tests.test_worker_task_dispatch tests.test_worker_process_lifecycle tests.test_worker_classes_init

To run the whole test suite in the same container:

docker run --rm --network=host -v "$PWD":/work -w /work rsstag-test

Stop the test database when finished:

docker compose -f docker-compose.test.yml down

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors