Home

Awesome

dsavell/grav

grav

Grav is a Fast, Simple, and Flexible file-based Web-platform. There is Zero installation required. Although Grav follows principles similar to other flat-file CMS platforms, it has a different design philosophy than most.

The underlying architecture of Grav is built using well established and best-in-class technologies. This is to ensure that Grav is simple to use and easy to extend. Some of these key technologies include:

Supported Architectures

We utilise the docker manifest for multi-platform awareness. More information is available from docker here.

Simply pulling dsavell/grav:admin should retrieve the correct image for your arch, but you can also pull specific arch images via tags.

The architectures supported by this image are:

ArchitectureAvailableTag
x86-64amd64-<version tag>
arm64arm64v8-<version tag>
armhfarm32v7-<version tag>

Version Tags

This image provides various versions that are available via tags.

TagAvailableDescription
adminStable Grav Core + Admin plugin releases
coreStabe Grav Core releases
admin-<date>Stable Grav Core + Admin plugin releases + date
core-<date>Stabe Grav Core releases + date
admin-<version tag>Pinned Grav Core + Admin plugin releases
core-<version tag>Pinned Grav Core releases
admin-<version tag>-<date>Pinned Grav Core + Admin plugin releases + date
core-<version tag>-<date>Pinned Grav Core releases + date

Application Setup

WebUI can be found at http://<your-ip>

More information can be found on the official documentation here

Usage

Here are some example snippets to help you get started creating a container.

docker-compose

---
version: '2.1'
services:
  grav:
    image: dsavell/grav:<TAG>
    container_name: grav
    restart: unless-stopped
    environment:
      - DUID=1000
      - DGID=1000
      - TZ=Europe/London # optional
      - GRAV_MULTISITE=subdirectory # optional
      - ROBOTS_DISALLOW=false # optional
      - GRAV_PLUGINS=devtools,precache # optional
    volumes:
      - /data/containers/grav/backup:/var/www/grav/backup
      - /data/containers/grav/logs:/var/www/grav/log
      - /data/containers/grav/user:/var/www/grav/user
    ports:
      - 80:80

docker cli (click here for more info)

docker create \
  --name=grav \
  --restart unless-stopped \
  -e DUID=1000 \
  -e DGID=1000 \
  -p 80:80 \
  -e TZ=Europe/London `# optional` \
  -e GRAV_MULTISITE=subdirectory `# optional` \
  -e ROBOTS_DISALLOW=false `# optional` \
  -e GRAV_PLUGINS=devtools,precache `# optional` \
  -v /data/containers/grav/backup:/var/www/grav/backup \
  -v /data/containers/grav/logs:/var/www/grav/logs \
  -v /data/containers/grav/user:/var/www/grav/user \
  dsavell/grav:<TAG>
docker start grav

Parameters

Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate <external>:<internal> respectively. For example, -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080 outside the container.

ParameterFunction
-p 80Http webUI
-e DUID=1000for UserID - see below for explanation
-e DGID=1000for GroupID - see below for explanation
-e TZ-e GRAV_MULTISITE=subdirectoryDeploy a Grav multisite (subdirectory) installation.
-e ROBOTS_DISALLOW=falseReplace default /robots.txt file with one discouraging indexers.
-e TZ=Europe/LondonSet your timezone
-e GRAV_PLUGINS=devtools,precacheInstall extra plugins automaticall (must be comma separated)
-v /var/www/backupContains your location for Grav backups
-v /var/www/logsContains your location for your Grav log files
-v /var/www/userContains your Grav content

User / Group Identifiers

When using volumes (-v flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user PUID and group PGID.

Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.

In this instance PUID=1000 and PGID=1000, to find yours use id user as below:

  $ id username
    uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)

Issues

Changelog