docker-grav icon indicating copy to clipboard operation
docker-grav copied to clipboard

Improvements

Open rhukster opened this issue 7 years ago • 7 comments

This is currently a simple php72-apache based image, but there's definitely lots of room for improvements.

Some things I would like to get added

  • Nginx rather than Apache (perhaps Nginx reverse proxy to Apache for .htaccess support?)
  • Ability to specify stable/testing release of Grav to be pulled.
  • Ability to specify a github repo to pull from and build out.
    • Skeleton Support - Basically the user/ folder in repo, so would clone/install Grav then clone the skeleton repo, and run bin/grav install to get the dependencies installed
    • Full Site Support - This is where an entire site is stored in git, so should be just a simple clone
  • Ability to easily execute CLI commands
  • Ability to easily shell to container and do stuff
  • Resolve permissions issues. Currently the site installs as www-data user but the volume mounts as root. Saves via volumes seem to map back to user ok, but still feels dirty.
  • LetsEncrypt SSL support
  • Docker Compose to provide data-persistence in the container
  • Checkout Treatys Image - https://github.com/getmedia-digital/grav-docker

Anything else i'm missing?

rhukster avatar Sep 13 '18 23:09 rhukster

here there! @rhukster :)

I'm more than happy to help, working on a PR btw,

few questions if i may: Nginx rather than Apache (perhaps Nginx reverse proxy to Apache for .htaccess support?) ==> how about moving from nginx to traefik ? grav docker image will still use Apache, but we'll specify traefik as a RP in the compose file Ability to specify stable/testing release of Grav to be pulled. ==> should be dealt at the build level i guess Ability to specify a github repo to pull from and build out. ==> need help to understand that as i'm new to grav Skeleton Support - Basically the user/ folder in repo, so would clone/install Grav then clone the skeleton repo, and run bin/grav install to get the dependencies installed ==> need help to understand that as i'm new to grav Full Site Support - This is where an entire site is stored in git, so should be just a simple clone Ability to easily execute CLI commands ==> Will do Ability to easily shell to container and do stuff ==> Will do Resolve permissions issues. Currently the site installs as www-data user but the volume mounts as root. Saves via volumes seem to map back to user ok, but still feels dirty. ==> Docker for Mac and Docker for Windows uses a user remap features, so it should be ok (not that dirty :) ), but for Linux users it could be tricky

LetsEncrypt SSL support ==> using traefik is breath easy for this, I shall highly recommend it

Docker Compose to provide data-persistence in the container ==> will do

UPDATE back on track , PR should be coming within the end of this week-end :)

xinity avatar Sep 24 '18 06:09 xinity

perhaps this dockerfile which already working with nginx and have all the php module required could be a great inspiration

JOduMonT avatar Nov 03 '18 15:11 JOduMonT

also to pass from dev to prod easily I made 2 system.yaml

  1. dev.yaml
  2. prod.yaml than depending on the environment I generate a link with ln -s for system.yaml

JOduMonT avatar Nov 03 '18 15:11 JOduMonT

I will recommend keeping an Image with Apache. Now all the Hosting companies are using Nginx and many of them use Apache.

GTuritto avatar Mar 07 '19 14:03 GTuritto

Has anyone tried to use the built docker file on a Kubernetes cluster?

donnay avatar Jul 06 '19 22:07 donnay

For production environments the container should run with --privileged=false and --user=someNonAdminID. I did not test this yet, but it should have a place in your README :) I'm not sure how well this works with named volumes, but I'm sure someone here knows the drill!

H8to avatar Apr 30 '20 09:04 H8to