{"id":31695174,"url":"https://github.com/tuomas2/civ6webhook","last_synced_at":"2025-10-08T16:45:33.502Z","repository":{"id":315380508,"uuid":"1059248747","full_name":"tuomas2/civ6webhook","owner":"tuomas2","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-18T07:56:22.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-18T09:41:33.574Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tuomas2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-18T07:38:13.000Z","updated_at":"2025-09-18T07:56:25.000Z","dependencies_parsed_at":"2025-09-18T09:41:35.544Z","dependency_job_id":"b3b13751-56d3-49fc-9540-2e70934bc314","html_url":"https://github.com/tuomas2/civ6webhook","commit_stats":null,"previous_names":["tuomas2/civ6webhook"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/tuomas2/civ6webhook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuomas2%2Fciv6webhook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuomas2%2Fciv6webhook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuomas2%2Fciv6webhook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuomas2%2Fciv6webhook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tuomas2","download_url":"https://codeload.github.com/tuomas2/civ6webhook/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuomas2%2Fciv6webhook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278981266,"owners_count":26079631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-08T16:45:04.818Z","updated_at":"2025-10-08T16:45:33.497Z","avatar_url":"https://github.com/tuomas2.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Civ6 Notifier Webhook Service\n\nThis is a simple webhook service that listens for incoming POST requests and sends notifications via the PushOver API.\n\n## Features\n\n- Receives webhook payloads with a `message` field\n- Sends push notifications to your device using PushOver\n- Configurable via environment variables\n- Docker support with production WSGI server (Gunicorn)\n- Nginx proxy configuration sample\n\n## Setup\n\n1. **Install Dependencies**:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n2. **Create Secrets File**:\n   Create a file named `civ6notifier.secrets` with your PushOver credentials:\n   ```\n   export PUSHOVER_TOKEN=your_pushover_app_token\n   export PUSHOVER_USER=your_pushover_user_key\n   ```\n   Get these from https://pushover.net/\n\n3. **Run the Service**:\n   ```bash\n   ./run.sh\n   ```\n   This will source the secrets and start the Flask app on port 5000.\n\n## Docker Usage\n\nThe Docker container uses Gunicorn as a production WSGI server with 4 worker processes for better performance and reliability.\n\n1. **Build and Run with Script**:\n   ```bash\n   ./run_docker.sh\n   ```\n   This will source the secrets, build the image, and run the container with Gunicorn.\n\n2. **Manual Build and Run**:\n   ```bash\n   docker build -t civ6notifier .\n   source civ6notifier.secrets\n   docker run -p 5000:5000 \\\n     -e PUSHOVER_TOKEN=$PUSHOVER_TOKEN \\\n     -e PUSHOVER_USER=$PUSHOVER_USER \\\n     civ6notifier\n   ```\n\n   Note: The `civ6notifier.secrets` file uses bash export syntax for compatibility with both direct Python execution and Docker.\n\n## Nginx Configuration\n\nTo integrate with your existing server, use the provided `nginx-sample.conf` as a template. Copy it to `/etc/nginx/sites-available/` and create a symlink in `/etc/nginx/sites-enabled/`. Adjust the `server_name` and paths as needed.\n\nExample:\n```bash\nsudo cp nginx-sample.conf /etc/nginx/sites-available/civ6notifier\nsudo ln -s /etc/nginx/sites-available/civ6notifier /etc/nginx/sites-enabled/\nsudo nginx -t\nsudo systemctl reload nginx\n```\n\n## API Usage\n\nSend a POST request to `http://yourserver/webhook` (or `http://localhost:5000/webhook` if running locally) with JSON payload:\n\n```json\n{\n  \"message\": \"Your notification message here\"\n}\n```\n\nThe service will send the message as a push notification via PushOver.\n\n## Security Notes\n\n- Keep `civ6notifier.secrets` secure and do not commit it to version control\n- Consider adding authentication to the webhook endpoint for production use\n- Use HTTPS in production (configure SSL in nginx)\n\n## Troubleshooting\n\nIf you're getting 404 errors or connection issues:\n\n1. **Run the test script**:\n   ```bash\n   ./test_service.sh\n   ```\n\n2. **Check if the service is running**:\n   ```bash\n   docker ps | grep civ6notifier\n   ```\n\n3. **Check Docker logs**:\n   ```bash\n   docker logs $(docker ps -q -f name=civ6notifier)\n   ```\n\n4. **Test local access**:\n   ```bash\n   curl http://localhost:5000/webhook -X POST -H \"Content-Type: application/json\" -d '{\"message\":\"Test\"}'\n   ```\n\n5. **Check nginx configuration**:\n   ```bash\n   sudo nginx -t\n   sudo systemctl reload nginx\n   ```\n\n6. **Check nginx error logs**:\n   ```bash\n   sudo tail -f /var/log/nginx/error.log\n   ```\n\n7. **Verify firewall settings**:\n   ```bash\n   sudo ufw status\n   ```\n\n8. **Update deployment**:\n   ```bash\n   ./update.sh  # Sync files to server\n   # Then on server: ./run_docker.sh\n   ```\n\n## Deployment\n\nTo deploy updates to your production server:\n\n1. **Sync files to server**:\n   ```bash\n   ./update.sh\n   ```\n\n2. **On the server, rebuild and restart**:\n   ```bash\n   cd ~/civ6notifier\n   ./run_docker.sh\n   ```\n\nThe `update.sh` script uses rsync to efficiently sync only changed files to your tp2 server, excluding sensitive files and build artifacts.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuomas2%2Fciv6webhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftuomas2%2Fciv6webhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuomas2%2Fciv6webhook/lists"}