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

Add volume and move grav installation in entrypoint.sh

Open boTux opened this issue 7 years ago • 4 comments

With the new entrypoint.sh and the edition in the Dockerfile, grav is now downloaded and extracted to /usr/src/ and the at first start it's copied in /var/www/html if index.php doesn't exist.

Heavily based on wordpress image.

I also added ldap php dependencies. Should we add also other deps like redis ?

boTux avatar Oct 25 '18 21:10 boTux

Build

Build nicely on gitlab : docker/grav/pipelines/34364510.

For continus integration and testing I'm using gitlab to work on this project : botux-fr/docker/grav.


Docker image

You can use and test this image on the gitlab docker registry :

registry.gitlab.com/botux-fr/docker/grav:latest

With docker-compose :

version: "3.6"

services:
  grav:
    image: registry.gitlab.com/botux-fr/docker/grav:latest
    restart: always
    ports:
      - 8080:80
    volumes:
      - ./data/:/var/www/html/

And go on http://localhost:8080/


If you're using traefik as reverse proxy, you can use :

version: "3.6"

networks:
  reverse-proxy:
    name: reverse-proxy
    external: true

services:
  grav:
    image: registry.gitlab.com/botux-fr/docker/grav:latest
    restart: always
    networks:
      - reverse-proxy
    labels:
      - "traefik.docker.network=reverse-proxy"
      - "traefik.enable=true"
      - "traefik.port=80"
      - "traefik.backend=grav"
      - "traefik.frontend.passHostHeader=true"
      - "traefik.frontend.rule=Host:${DOMAIN:-my.domain.tld}"
      - "traefik.frontend.whiteList.sourceRange=${WHITELIST:-}"
    volumes:
      - ./data/:/var/www/html/

Have fun :p

boTux avatar Oct 25 '18 21:10 boTux

Update to 1.5.3 works nicely too : https://github.com/boTux-fr/docker-grav/commit/b53e6525f7a3e1d3460f5c076d64e58661e8c18d

boTux avatar Oct 25 '18 22:10 boTux

@rhukster are you planning to managed pull request approvals and allow external contributions ?

Regards

boTux avatar Apr 15 '19 20:04 boTux

I have a big ol' note to go through the docker PRs. So Yup, I totally will go through them, but just been focused on regular Grav things last few months.

rhukster avatar Apr 15 '19 20:04 rhukster