{"id":15141795,"url":"https://github.com/thejordanprice/p2pspider-docker","last_synced_at":"2026-01-31T03:31:41.297Z","repository":{"id":249909182,"uuid":"832923136","full_name":"thejordanprice/p2pspider-docker","owner":"thejordanprice","description":"Prebuilt docker image for p2pspider for easy deployment.","archived":false,"fork":false,"pushed_at":"2024-07-24T23:19:50.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-11T22:50:02.986Z","etag":null,"topics":["dht","dht-network","docker","docker-compose","docker-image","nodejs","pm2","self-hosted","spider","torrent","torrents-collection","torrents-crawler","website"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/thejordanprice/p2pspider","language":"Dockerfile","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/thejordanprice.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}},"created_at":"2024-07-24T02:23:53.000Z","updated_at":"2024-12-11T10:37:07.000Z","dependencies_parsed_at":"2024-09-21T14:02:42.320Z","dependency_job_id":null,"html_url":"https://github.com/thejordanprice/p2pspider-docker","commit_stats":null,"previous_names":["thejordanprice/p2pspider-docker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thejordanprice/p2pspider-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thejordanprice%2Fp2pspider-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thejordanprice%2Fp2pspider-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thejordanprice%2Fp2pspider-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thejordanprice%2Fp2pspider-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thejordanprice","download_url":"https://codeload.github.com/thejordanprice/p2pspider-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thejordanprice%2Fp2pspider-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28928148,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T02:59:34.861Z","status":"ssl_error","status_checked_at":"2026-01-31T02:59:05.369Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["dht","dht-network","docker","docker-compose","docker-image","nodejs","pm2","self-hosted","spider","torrent","torrents-collection","torrents-crawler","website"],"created_at":"2024-09-26T09:02:05.598Z","updated_at":"2026-01-31T03:31:41.284Z","avatar_url":"https://github.com/thejordanprice.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# p2pspider-docker\n\n## Prerequisites\n\n- Docker\n- Docker Compose\n\n## Getting Started\n\n### Building the Docker Image\n\n1. **Clone the Repository**\n\n   ```bash\n   git clone https://github.com/thejordanprice/p2pspider-docker\n   cd p2pspider-docker\n   ```\n\n2. **Configure Environment Variables**\n\n   Create a `.env` file in the root of the project with your environment variables. Example:\n\n   ```env\n   REDIS_URI=redis://redis:6379\n   MONGO_URI=mongodb://mongodb:27017/magnetdb\n   SITE_HOSTNAME=127.0.0.1\n   SITE_NAME=DHT Spider\n   SITE_PORT=8080\n   ```\n\n3. **Build and Run the Containers**\n\n   Run the following command to build and start the containers:\n\n   ```bash\n   docker-compose up --build\n   ```\n\n4. **Access the Application**\n\n   The application will be accessible on the port specified in `SITE_PORT`. By default, this is `http://127.0.0.1:8080`.\n\n### Using the Prebuilt Image\n\n1. **Deploy with Docker Compose**\n\n   Create a `docker-compose.yaml` file with the following configuration:\n\n   ```yaml\n   version: '3.8'\n\n   services:\n     mongodb:\n       image: mongo:latest\n       container_name: mongodb\n       ports:\n         - \"127.0.0.1:27017:27017\"\n       volumes:\n         - mongodb_data:/data/db\n         - mongodb_configdb:/data/configdb\n       networks:\n         - p2pspider_network\n\n     redis:\n       image: redis:latest\n       container_name: redis\n       ports:\n         - \"127.0.0.1:6379:6379\"\n       volumes:\n         - redis_data:/data\n       networks:\n         - p2pspider_network\n\n     app:\n       image: thejordanprice/p2pspider:latest\n       container_name: p2pspider\n       ports:\n         - \"${SITE_PORT:-8080}:${SITE_PORT:-8080}\"\n       environment:\n         REDIS_URI: ${REDIS_URI:-redis://redis:6379}\n         MONGO_URI: ${MONGO_URI:-mongodb://mongodb:27017/magnetdb}\n         SITE_HOSTNAME: ${SITE_HOSTNAME:-127.0.0.1}\n         SITE_NAME: ${SITE_NAME:-DHT Spider}\n         SITE_PORT: ${SITE_PORT:-8080}\n       depends_on:\n         - mongodb\n         - redis\n       networks:\n         - p2pspider_network\n\n   networks:\n     p2pspider_network:\n       driver: bridge\n\n   volumes:\n     mongodb_data:\n     mongodb_configdb:\n     redis_data:\n   ```\n\n   Start the containers with:\n\n   ```bash\n   docker-compose up\n   ```\n\n2. **Deploy with Docker Run**\n\n   You can also run the prebuilt image directly with Docker:\n\n   ```bash\n   docker run -d \\\n     --name mongodb \\\n     -p 127.0.0.1:27017:27017 \\\n     -v mongodb_data:/data/db \\\n     -v mongodb_configdb:/data/configdb \\\n     mongo:latest\n\n   docker run -d \\\n     --name redis \\\n     -p 127.0.0.1:6379:6379 \\\n     -v redis_data:/data \\\n     redis:latest\n\n   docker run -d \\\n     --name p2pspider \\\n     -p ${SITE_PORT:-8080}:${SITE_PORT:-8080} \\\n     -e REDIS_URI=${REDIS_URI:-redis://redis:6379} \\\n     -e MONGO_URI=${MONGO_URI:-mongodb://mongodb:27017/magnetdb} \\\n     -e SITE_HOSTNAME=${SITE_HOSTNAME:-127.0.0.1} \\\n     -e SITE_NAME=${SITE_NAME:-DHT Spider} \\\n     -e SITE_PORT=${SITE_PORT:-8080} \\\n     --link mongodb --link redis \\\n     thejordanprice/p2pspider:latest\n   ```\n\n   **Note**: Replace environment variable values or use default values as needed.\n\n## Dockerfile\n\nThe `Dockerfile` sets up the application environment and runs `daemon.js` and `webserver.js`. It does the following:\n\n- Uses the `node:18` base image.\n- Sets the working directory to `/app`.\n- Copies the repository contents into the container.\n- Installs dependencies with `npm install`.\n- Exposes port 8080.\n- Starts the application with `npm start`.\n\n## docker-compose.yaml\n\nThe `docker-compose.yaml` file defines the following services:\n\n- **mongodb**: Uses the official MongoDB image, exposing port 27017.\n- **redis**: Uses the official Redis image, exposing port 6379.\n- **app**: Builds the Docker image from the `Dockerfile`, depends on `mongodb` and `redis`, and exposes the application on port 8080.\n\n## Troubleshooting\n\n- **Port Forwarding**: Ensure that port 6881 is properly forwarded in your router or firewall settings. This is necessary to collect metadata effectively, as it allows incoming connections to reach your application. Without this port forwarding, the application may not receive the data it needs.\n- **Connection Refused**: Ensure that the Redis and MongoDB services are running and accessible. Verify the connection settings in your environment.\n- **Environment Variable Issues**: Ensure that environment variables are correctly set and match your configuration.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthejordanprice%2Fp2pspider-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthejordanprice%2Fp2pspider-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthejordanprice%2Fp2pspider-docker/lists"}