Skip to content

Conversation

@matiasAS
Copy link
Contributor

Summary

This PR adds an optional, lightweight NGINX web server to expose the generated results/ directory over HTTP after the rule extraction process finishes.

The existing behavior is preserved:

  • The Python script runs once
  • Firewall rules are fetched using environment variables
  • CSV, PDFs and graphs are generated as before

Once the Python process completes, NGINX starts and serves the generated files.


How it works

  • The container runs the Python script first
  • Results are written to results/
  • NGINX is started on port 8080
  • Directory listing is enabled for easy browsing of generated files

No changes were made to the core Python logic or data flow.


Usage

docker build --no-cache -t pyfrc2g .

docker run --rm \
  -e PFS_BASE_URL=<PFS_BASE_URL> \
  -e PFS_TOKEN=<PFS_TOKEN> \
  -p 8080:8080 \
  pyfrc2g

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant