-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bind html to a directory doesn't work #44
Comments
Sadly you can't use bind mounted host dirs because of the docker/mount mechanics: You really have to use a docker volume as shown in the |
@Isotop7 that's really strange. It works with every other container. Why wouldn't that work with grav? `#NginxProxy version: '3' `version: '3.3' networks: |
Did you find a fix for this? I can build the image but nothing is being created in the volume specified. I have plenty other containers that are using the host file system volume mounts |
I found another way to install grav by populating user dir if empty during container start. Therefore i skip user dir during build. A script will then populate /var/www/user as described in README.md This commit also includes https://github.com/Freiheitswolke/docker-grav/tree/fix/volume and some changes to README.md to reflect the changed volumes. The commit will not break the old way with a mount for the whole '/var/www/html' for those who want to upgrade grav via the admin console. Building or pulling the container image with the new version of grav is a more proper way to perform upgrades in my opinion. Closes getgrav#44
I found another way to install grav by populating user dir if empty during container start. Therefore i skip user dir during build. A script will then populate /var/www/user as described in README.md This commit also includes https://github.com/Freiheitswolke/docker-grav/tree/fix/volume and some changes to README.md to reflect the changed volumes. The commit will not break the old way with a mount for the whole '/var/www/html' for those who want to upgrade grav via the admin console. Building or pulling the container image with the new version of grav is a more proper way to perform upgrades in my opinion. Closes getgrav#44
My docker-compose file:
version: '3.3' services: grav: build: ./ container_name: grav ports: - '880:80' restart: always volumes: - '/root/grav/html:/var/www/html' image: 'grav:latest' networks: default: name: test_net
If I run docker-compose up -d, or up --force-recreate --build -d, the html folder is always empty... resulting in a Forbidden error in the browser.
The text was updated successfully, but these errors were encountered: