{"id":15972949,"url":"https://github.com/mwalbeck/docker-getgrav","last_synced_at":"2025-03-26T20:30:45.404Z","repository":{"id":45100458,"uuid":"332019020","full_name":"mwalbeck/docker-getgrav","owner":"mwalbeck","description":"Docker image for GRAV CMS","archived":false,"fork":false,"pushed_at":"2024-10-28T12:16:10.000Z","size":292,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-28T15:52:00.893Z","etag":null,"topics":["docker","docker-image","getgrav","grav","grav-cms"],"latest_commit_sha":null,"homepage":"","language":"Starlark","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/mwalbeck.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":"2021-01-22T17:40:01.000Z","updated_at":"2024-10-17T08:18:10.000Z","dependencies_parsed_at":"2023-11-11T19:29:27.513Z","dependency_job_id":"cbb7b904-c584-4b50-9ed1-fcd0cb144666","html_url":"https://github.com/mwalbeck/docker-getgrav","commit_stats":{"total_commits":508,"total_committers":3,"mean_commits":"169.33333333333334","dds":"0.17716535433070868","last_synced_commit":"3bc9aa639057590e910b2718eb935a8eea95d7c8"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwalbeck%2Fdocker-getgrav","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwalbeck%2Fdocker-getgrav/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwalbeck%2Fdocker-getgrav/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwalbeck%2Fdocker-getgrav/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mwalbeck","download_url":"https://codeload.github.com/mwalbeck/docker-getgrav/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222163981,"owners_count":16941551,"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","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","docker-image","getgrav","grav","grav-cms"],"created_at":"2024-10-07T21:01:24.305Z","updated_at":"2024-10-30T04:41:34.254Z","avatar_url":"https://github.com/mwalbeck.png","language":"Starlark","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-getgrav\n\n[![Build Status](https://build.walbeck.it/api/badges/walbeck-it/docker-getgrav/status.svg)](https://build.walbeck.it/walbeck-it/docker-getgrav)\n![Docker Pulls](https://img.shields.io/docker/pulls/mwalbeck/getgrav)\n\nDocker container for [GRAV CMS](https://getgrav.org/). All images are based on the PHP fpm-buster image.\n\nYou can find the image on [Docker Hub](https://hub.docker.com/r/mwalbeck/getgrav) and the source code can be found [here](https://git.walbeck.it/walbeck-it/docker-getgrav) with a mirror on [GitHub](https://github.com/mwalbeck/docker-getgrav)\n\n## Tags\n\n* latest, 1.7, 1.7.*\n* latest-prod, 1.7-prod, 1.7.*-prod\n\n## Usage\n\nThis is purely php-fpm based image, which means you need another container to act as the webserver, I recommend nginx. For a nginx config to use with GRAV, you can have a look at the [GRAV documentation](https://learn.getgrav.org/17/webservers-hosting/servers/nginx)\n\nGRAV is by default installed into /var/www/html where you will find all the folders from a normal GRAV install. A user has been created in container with a default id of 33 (same as www-data).\n\nTo provide your site data to the container simply do use a volume mount to the desired folder. You can see the docker-compose example at the bottom for an example with volume mount and nginx webserver.\n\nWhen you deploy or update the docker container it will replace all the neccessary files and leave all folders with potential user generated content. The following folders are ignored\n\n```\nbackup/\nlogs/\ntmp/\nvendor/\nuser/\n```\n\nAll other folders will be overwritten, which also means that it's very easy to up and down grade your version of GRAV.\n\nAfter the GRAV files have been installed a **bin/grav install** will be run to install the correct composer dependencies into vendor and all plugins specified in your dependencies file, if you have one. Lastly the cache will be cleared.\n\nYou can customise the user id and group id the container user runs as, and the folder name under /var/www, that GRAV will be installed into, with environment variables:\n\n```\nUID=1000\nGID=1000\nGRAV_FOLDER=awesome-site\n```\n\nWith the above options the container user will run with a user id and group id of 1000. Grav will be installed into /var/www/awesome-site.\n\n### Prod image\n\nThe prod image exists if you would like to use the docker image with the read-only flag enabled. The prod container will be run as www-data with its default UID and GID, 33. You cannot change this at the moment. You can still customise the grav folder name just like the default image.\n\n### Commandline\n\nYou can easily use GRAV's commandline interface using docker exec:\n\n```\ndocker exec -u foo CONTAINER bin/(gpm|grav|plugin)\n```\n\nIf you choose a custom GRAV_FOLDER you need to specify the workdir like so, replacing GRAV_FOLDER with your chosen folder:\n\n```\ndocker exec -u www-data -w /var/www/GRAV_FOLDER CONTAINER bin/(gpm|grav|plugin)\n```\n\n### Updating\n\nTo update the container you simple download the new container and replace it with the old one. For docker-compose that would be\n\n```\ndocker-compose pull\ndocker-compose up -d\n```\n\n### Example docker-compose\n\nThis is a sample docker-compose file using this image along with the official nginx container. The UID and GID has been changed to 1000 with the user option and the grav folder is \"awesome-grav-site\".\n\n```\nversion: '2'\n\nvolumes:\n  grav:\n\nnetworks:\n  frontend:\n\nservices:\n  app:\n    image: mwalbeck/getgrav:latest\n    restart: on-failure:5\n    networks:\n      - frontend\n    volumes:\n      - grav:/var/www/html\n      - /path/to/user:/var/www/html/user\n    environment:\n      - UID=1000\n      - GID=1000\n      - GRAV_FOLDER=awesome-grav-site\n\n  web:\n    image: nginx:latest\n    restart: on-failure:5\n    networks:\n      - frontend\n    volumes:\n      - /path/to/nginx:/etc/nginx:ro\n    volumes_from:\n      - app:ro\n    ports:\n      - 80:80\n      - 443:443\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwalbeck%2Fdocker-getgrav","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmwalbeck%2Fdocker-getgrav","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwalbeck%2Fdocker-getgrav/lists"}