{"id":18623980,"url":"https://github.com/lloydzhou/nginx-gridfs-docker","last_synced_at":"2026-01-26T04:07:14.739Z","repository":{"id":45866606,"uuid":"433337728","full_name":"lloydzhou/nginx-gridfs-docker","owner":"lloydzhou","description":"dockerfile for nginx-gridfs","archived":false,"fork":false,"pushed_at":"2021-12-01T09:41:38.000Z","size":7,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-17T06:41:13.815Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/lloydzhou.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}},"created_at":"2021-11-30T07:40:38.000Z","updated_at":"2024-09-13T05:35:58.000Z","dependencies_parsed_at":"2022-09-14T05:21:02.878Z","dependency_job_id":null,"html_url":"https://github.com/lloydzhou/nginx-gridfs-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lloydzhou/nginx-gridfs-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lloydzhou%2Fnginx-gridfs-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lloydzhou%2Fnginx-gridfs-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lloydzhou%2Fnginx-gridfs-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lloydzhou%2Fnginx-gridfs-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lloydzhou","download_url":"https://codeload.github.com/lloydzhou/nginx-gridfs-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lloydzhou%2Fnginx-gridfs-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28766467,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T03:54:34.369Z","status":"ssl_error","status_checked_at":"2026-01-26T03:54:33.031Z","response_time":59,"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":[],"created_at":"2024-11-07T04:26:56.970Z","updated_at":"2026-01-26T04:07:14.723Z","avatar_url":"https://github.com/lloydzhou.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nginx-gridfs\n\nhttps://github.com/lloydzhou/nginx-gridfs-1\n\nNginx module for serving files from MongoDB's GridFS( support SCRAM-SHA-1)\n\n# build\n1. based on ubuntu:18.4\n2. using multistage-build\n\n# Usage\n\n```\ndocker run [options] lloydzhou/nginx-gridfs\n\n```\n\n# test\n\n## dependency\n1. docker-compose\n\n## start server\n```\ndocker-compose up -d\n```\n## put file\n```\ndocker-compose exec mongo mongofiles --authenticationDatabase=admin -uroot -ppassword --db=gridfs put /entrypoint.sh\n```\n\n## default config\n```\n    server {\n        listen 80 default_server;\n        location ~ \"^/gridfs/[0-9a-f]{24}$\" {\n            rewrite /gridfs/(.*) /$1 last;\n        }\n        location / {\n            internal;\n            gridfs gridfs field=_id type=objectid;\n            mongo mongodb://root:password@mongo:27017/admin;\n        }\n        location /gridfs {\n            gridfs gridfs field=filename type=string;\n            mongo mongodb://root:password@mongo:27017/admin;\n        }\n    }\n```\n\n## get file by name\n```\ncurl http://localhost/gridfs/entrypoint.sh -vvv -o /dev/null\n*   Trying 127.0.0.1:80...\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to localhost (127.0.0.1) port 80 (#0)\n\u003e GET /gridfs/entrypoint.sh HTTP/1.1\n\u003e Host: localhost\n\u003e User-Agent: curl/7.80.0\n\u003e Accept: */*\n\u003e \n* Mark bundle as not supporting multiuse\n\u003c HTTP/1.1 200 OK\n\u003c Server: nginx/1.19.9\n\u003c Date: Tue, 30 Nov 2021 11:34:23 GMT\n\u003c Content-Type: application/octet-stream\n\u003c Content-Length: 11314\n\u003c Connection: keep-alive\n\u003c \n{ [4096 bytes data]\n100 11314  100 11314    0     0  5674k      0 --:--:-- --:--:-- --:--:-- 10.7M\n```\n\n## get file by id\n```\ncurl http://localhost/gridfs/61a60624833b6500b140e6a2 -vvv -o /dev/null\n*   Trying 127.0.0.1:80...\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to localhost (127.0.0.1) port 80 (#0)\n\u003e GET /gridfs/61a60624833b6500b140e6a2 HTTP/1.1\n\u003e Host: localhost\n\u003e User-Agent: curl/7.80.0\n\u003e Accept: */*\n\u003e \n* Mark bundle as not supporting multiuse\n\u003c HTTP/1.1 200 OK\n\u003c Server: nginx/1.19.9\n\u003c Date: Tue, 30 Nov 2021 11:32:05 GMT\n\u003c Content-Type: application/octet-stream\n\u003c Content-Length: 11314\n\u003c Connection: keep-alive\n\u003c \n{ [8192 bytes data]\n100 11314  100 11314    0     0  6172k      0 --:--:-- --:--:-- --:--:-- 10.7M\n```\n\n## upload file\n```\ncurl http://localhost/gridfs/61a717e9c0944d0008580e03 -X POST --data-binary @README.md -H 'Content-Type: text/plain' -vvv\nNote: Unnecessary use of -X or --request, POST is already inferred.\n*   Trying 127.0.0.1:80...\n* Connected to localhost (127.0.0.1) port 80 (#0)\n\u003e POST /gridfs/61a717e9c0944d0008580e03 HTTP/1.1\n\u003e Host: localhost\n\u003e User-Agent: curl/7.80.0\n\u003e Accept: */*\n\u003e Content-Type: text/plain\n\u003e Content-Length: 315625\n\u003e \n* We are completely uploaded and fine\n* Mark bundle as not supporting multiuse\n\u003c HTTP/1.1 201 Created\n\u003c Server: nginx/1.19.9\n\u003c Date: Wed, 01 Dec 2021 09:14:51 GMT\n\u003c Content-Type: text/plain\n\u003c Content-Length: 2\n\u003c Connection: keep-alive\n\u003c X-File-Size: 315625\n\u003c X-File-MD5: 62c0b2a2fd0d56421d3412d638b5fc7e\n\u003c X-File-Id: 61a717e9c0944d0008580e03\n\u003c \n* Connection #0 to host localhost left intact\nOK\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flloydzhou%2Fnginx-gridfs-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flloydzhou%2Fnginx-gridfs-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flloydzhou%2Fnginx-gridfs-docker/lists"}