{"id":16532836,"url":"https://github.com/mjstealey/grav-nginx","last_synced_at":"2026-04-21T05:33:33.669Z","repository":{"id":93420398,"uuid":"96631058","full_name":"mjstealey/grav-nginx","owner":"mjstealey","description":"Debian Stretch Docker based Grav installation using Nginx","archived":false,"fork":false,"pushed_at":"2017-07-09T20:38:31.000Z","size":10,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-24T08:18:24.142Z","etag":null,"topics":["docker","grav","grav-admin","nginx"],"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/mjstealey.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":"2017-07-08T16:36:28.000Z","updated_at":"2019-01-22T01:39:28.000Z","dependencies_parsed_at":"2023-03-07T13:01:02.808Z","dependency_job_id":null,"html_url":"https://github.com/mjstealey/grav-nginx","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"d68f2dfd0e0d32510a262a5d94f267393d374fbe"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mjstealey/grav-nginx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjstealey%2Fgrav-nginx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjstealey%2Fgrav-nginx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjstealey%2Fgrav-nginx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjstealey%2Fgrav-nginx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mjstealey","download_url":"https://codeload.github.com/mjstealey/grav-nginx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjstealey%2Fgrav-nginx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32078937,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T02:38:07.213Z","status":"ssl_error","status_checked_at":"2026-04-21T02:38:06.559Z","response_time":128,"last_error":"SSL_read: 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":["docker","grav","grav-admin","nginx"],"created_at":"2024-10-11T18:13:32.302Z","updated_at":"2026-04-21T05:33:33.644Z","avatar_url":"https://github.com/mjstealey.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grav-nginx\nDebian [Stretch](https://hub.docker.com/_/debian/) Docker based [Grav](https://getgrav.org) installation using Nginx\n\n**WORK IN PROGRESS**:\n\n- [x] Basic implementation in Docker\n- [x] Extend volume mount to local `html` directory\n- [x] Allow UID/GID setting within container for host user permissions on mounted volumes\n- [x] SSL integration - self generated certs\n- [ ] LetsEncrypt documentation\n\n## Supported tags and respective Dockerfile links\n\nTags available in Dockerhub: [mjstealey/grav-nginx](https://hub.docker.com/r/mjstealey/grav-nginx/)\n\n- 1.3.0-rc.5, latest ([1.3.0-rc.5/Dockerfile](https://github.com/mjstealey/grav-nginx/blob/master/1.3.0-rc.5/Dockerfile))\n\n### Pull image from dockerhub\n\n```bash\ndocker pull mjstealey/grav-nginx:latest\n```\n\n### Usage:\n\n**Example 1.** Deploy with default configuration over http\n\n```bash\ndocker run --name grav -p 80:80 mjstealey/grav-nginx:latest\n```\n- **NOTE**: Generally the `-d` flag would be used in the above call to daemonize the process\n\n```bash\n$ docker run --name grav -p 80:80 mjstealey/grav-nginx:latest\nUnable to find image 'mjstealey/grav-nginx:latest' locally\nlatest: Pulling from mjstealey/grav-nginx\nc75480ad9aaf: Pull complete\n58434b614b6f: Pull complete\n71377105a799: Pull complete\n595da19ffe38: Pull complete\n74b64a239d34: Pull complete\nd966c11a03be: Pull complete\nDigest: sha256:961b66eb7bbc40566885b4eb187d6b5b1bcee28008db95da004fcff8a381c056\nStatus: Downloaded newer image for mjstealey/grav-nginx:latest\nusermod: no changes\nStarting nginx: nginx.\nArchive:  /grav-admin-v1.3.0-rc.5.zip\n   creating: grav-admin/\n  inflating: grav-admin/index.php\n   creating: grav-admin/bin/\n  inflating: grav-admin/bin/composer.phar\n  inflating: grav-admin/bin/plugin\n  inflating: grav-admin/bin/grav\n  inflating: grav-admin/bin/gpm\n  inflating: grav-admin/CODE_OF_CONDUCT.md\n  \n...\n\ndeleting grav-admin/CONTRIBUTING.md\ndeleting grav-admin/CODE_OF_CONDUCT.md\ndeleting grav-admin/CHANGELOG.md\ndeleting grav-admin/.htaccess\ndeleting grav-admin/\n\nsent 20,348,404 bytes  received 58,553 bytes  13,604,638.00 bytes/sec\ntotal size is 20,137,437  speedup is 0.99\n/docker-entrypoint.sh: line 137: /subfolder/index.php: No such file or directory\nRestarting nginx: nginx.\nRestarting PHP 7.0 FastCGI Process Manager: php-fpm7.0.\nReloading nginx configuration: nginx.\n```\n\nThe running site can be found at [http://localhost](http://localhost).\n\n- On first use the user will be redirected to [http://localhost/admin](http://localhost/admin) to register an Admin User for the installation.\n![Grav Register Admin User](https://user-images.githubusercontent.com/5332509/27988518-752da2e0-63f1-11e7-8731-9e6e185536c8.png)\n\n**Example 2.** Using `docker-compose.yml` to deploy a locally built container with **(1.)** Local volume mount, **(2.)** SSL using self generated certificates\n\nAn example `docker-compose.yml` file is included in the repository to demonstrate how to use the self generated SSL certificates. This is useful for development, but should not be used in prodcution as the generated certificates are not signed by any authority.\n\n```yaml\nversion: '3.3'                         # Varies based on the installed docker version\nservices:\n  grav-nginx:\n    build:                             # Local build definition\n      context: ./1.3.0-rc.5            # Optionally use image: call\n      dockerfile: Dockerfile\n    container_name: grav\n    environment:\n      - USE_SSL=true                   # Set to use SSL\n      - USE_SELF_GEN_CERT=true         # Set to generate self signed certs\n    volumes:\n      - \"./html:/home/grav/www/html\"   # Set to share local volume named html\n    ports:\n      - \"80:80\"                        # Serve http on port 80\n      - \"443:443\"                      # Serve https on port 443\n```\n\nThe user can build and deploy this container as follows:\n\n```bash\n$ cd /PATH/TO/grav-nginx/\n$ docker-compose build\n$ docker-compose up\n```\n- **NOTE**: Generally the `-d` flag would be used in the above call to daemonize the process\n\n```bash\n$ docker-compose build\nBuilding grav-nginx\nStep 1/23 : FROM debian:stretch\nstretch: Pulling from library/debian\nc75480ad9aaf: Already exists\nDigest: sha256:7d067f77d2ae5a23fe6920f8fbc2936c4b0d417e9d01b26372561860750815f0\nStatus: Downloaded newer image for debian:stretch\n ---\u003e a2ff708b7413\nStep 2/23 : MAINTAINER Michael J. Stealey \u003cmichael.j.stealey@gmail.com\u003e\n ---\u003e Running in 329135b249a5\n ---\u003e 014e0fc2a564\nRemoving intermediate container 329135b249a5\n...\nRemoving intermediate container d675a5afd636\nStep 23/23 : CMD grav\n ---\u003e Running in b2fada24de9b\n ---\u003e 76792ba39d05\nRemoving intermediate container b2fada24de9b\n\nSuccessfully built 76792ba39d05\nSuccessfully tagged gravnginx_grav-nginx:latest\n```\n\n```bash\n$ docker-compose up -d\nCreating grav ...\nCreating grav ... done\n```\n\nAfter a few moments the running site can be found at [https://localhost](https://localhost).\n\n- On first use the user will be asked if they wish to proceed to an \"unsafe\" https site, and when given the OK, redirected to [https://localhost/admin](https://localhost/admin) to register an Admin User for the installation.\n\n![https-ssl-cert-warning](https://user-images.githubusercontent.com/5332509/27988520-7de8ff60-63f1-11e7-9642-0a5a45d9a90c.png)\n\n![https-grav-admin](https://user-images.githubusercontent.com/5332509/27988522-83b1402e-63f1-11e7-9919-5c0d7c7de4f3.png)\n\nAll of the grav site related files will now be stored in the local `html` directory of the checked out repository.\n\n```bash\n$ ls ./html\nCHANGELOG.md       README.md          cache              index.php          robots.txt         vendor\nCODE_OF_CONDUCT.md assets             composer.json      local.dev.crt      system             webserver-configs\nCONTRIBUTING.md    backup             composer.lock      local.dev.key      tmp\nLICENSE.txt        bin                images             logs               user\n```\n\nThe two files named `local.dev.crt` and `local.dev.key` are the self generated SSL certificate and key pair. These are moved to locations `/etc/ssl/certs/server.crt` and `/etc/ssl/private/server.key` for use by Nginx in the **grav** container by the `docker-entrypoint.sh` script at runtime.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmjstealey%2Fgrav-nginx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmjstealey%2Fgrav-nginx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmjstealey%2Fgrav-nginx/lists"}