Improvements
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 installto get the dependencies installed - Full Site Support - This is where an entire site is stored in git, so should be just a simple clone
- Skeleton Support - Basically the user/ folder in repo, so would clone/install Grav then clone the skeleton repo, and run
- 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?
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 :)
perhaps this dockerfile which already working with nginx and have all the php module required could be a great inspiration
also to pass from dev to prod easily I made 2 system.yaml
- dev.yaml
- prod.yaml
than depending on the environment I generate a link with
ln -sfor system.yaml
I will recommend keeping an Image with Apache. Now all the Hosting companies are using Nginx and many of them use Apache.
Has anyone tried to use the built docker file on a Kubernetes cluster?
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!