You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Closesgetgrav#44
Copy file name to clipboardExpand all lines: README.md
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,11 @@ This currently is pretty minimal and uses:
14
14
15
15
## Persisting data
16
16
17
-
To save the Grav site data to the host file system (so that it persists even after the container has been removed), simply map the container's `/var/www/html` directory to a named Docker volume or to a directory on the host.
17
+
To save the Grav site data to the host file system (so that it persists even after the container has been removed), simply map the container's `/var/www/html/user` directory to a named Docker volume or to a directory on the host.
18
18
19
-
> If the mapped directory or named volume is empty, it will be automatically populated with a fresh install of Grav the first time that the container starts. However, once the directory/volume has been populated, the data will persist and will not be overwritten the next time the container starts.
19
+
> If the mapped directory or named volume is empty, it will be automatically populated with a fresh user dir the first time that the container starts. However, once the directory/volume has been populated, the data will persist and will not be overwritten the next time the container starts.
20
+
21
+
This also applies for '/var/www/backup' and '/var/www/logs' except population at first startup.
20
22
21
23
## Building the image from Dockerfile
22
24
@@ -35,7 +37,7 @@ Point browser to `http://localhost:8000` and create user account...
35
37
## Running Grav Image with Latest Grav + Admin with a named volume (can be used in production)
36
38
37
39
```
38
-
docker run -d -p 8000:80 --restart always -v grav_data:/var/www/html grav:latest
0 commit comments