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

Docker-grav with proxy

Open SnuppeDeluxe opened this issue 7 years ago • 4 comments

Hi, I tried your container in a standalone machine. It worked great and I wont to use it in production. But my production system is behind a proxy (https://github.com/evertramos/docker-compose-letsencrypt-nginx-proxy-companion) and every system is managed by this proxy. Now I tried to generate a docker-compose file, to use your image with the proxy, but I don't have any rights for the connection.

Forbidden You don't have permission to access / on this server. Apache/2.4.25 (Debian) Server at *myURL Port 80

Please, help me. Where is my mistake?


version: '3'

services: grav: image: 'grav:latest' volumes: - ./data:/var/www/html environment: VIRTUAL_HOST: *myURL LETSENCRYPT_HOST: *myURL LETSENCRYPT_EMAIL: MAIL@PROVIDER restart: always

networks: default: external: name: webproxy

SnuppeDeluxe avatar Oct 19 '18 15:10 SnuppeDeluxe

Hi,

It's because you used a volume for /var/www/html in your docker-compose.yml

volumes:
  - ./data:/var/www/html

And for now if you bind a volume you have to install grav manually inside your container.

Checkout #5 where I'm trying to solve this.

Thanks,

boTux avatar Oct 25 '18 21:10 boTux

+1 to merge @boTux

Worked well for me, was able to mount a volume via docker-compose.yml properly. Without having the mount override the directory after the container starts up.

holdenrehg avatar Jan 10 '19 22:01 holdenrehg

Most of the time you will only need the user, backup and logs directories outside of your container. I recommend volumes for those three instead of the whole system.

SimJoSt avatar Jul 27 '19 14:07 SimJoSt

You can use Traefik instead of NGINX proxy. It's more perfulll, simple and nativerly supported by docker.

gushmazuko avatar Dec 14 '20 13:12 gushmazuko