docker-grav
docker-grav copied to clipboard
Docker-grav with proxy
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
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,
+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.
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.
You can use Traefik instead of NGINX proxy. It's more perfulll, simple and nativerly supported by docker.