Skip to content

Host GravCMS as Dockcontainer with optional user folder mount.

License

Notifications You must be signed in to change notification settings

Kopry/gravcms-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Grav Docker container

Thanks to https://github.com/benjick for his great work! Here https://hub.docker.com/r/benjick/grav/

Usage

First way

A folder called user will be created in the same folder as you are running this (if it doesn't exist already). You can then develop in this folder.

# Start the container in the background, mapping port 3030 to your Grav container
docker run \
  -v $(pwd)/user:/var/www/html/user \
  -p 3030:80 \
  --name mygrav -d nmonst4/gravcms
# Installs the default theme 'antimatter'
docker exec mygrav bin/gpm install antimatter

Now you can go to localhost:3030 and see your page in action.

# start with a skeleton
git clone https://github.com/getgrav/grav-skeleton-twenty-site ./user
rm -rf ./user/.git
docker run \
  -v $(pwd)/user:/var/www/html/user \
  -p 3030:80 \
  --name mygrav -d nmonst4/gravcms

Second way

If you want to push your app to a registry this might be what your Dockerfile looks like

FROM nmonst4/gravcms:latest
COPY ./user /var/www/html/user

and to run it

docker build -t myapp .
docker run -p 3030:80 --name mygrav -d myapp

Where user is the user-folder for your Grav site

For Mac

https://github.com/adlogix/docker-machine-nfs

About

Host GravCMS as Dockcontainer with optional user folder mount.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%