Hello,
I’m completely new to grav, and not experienced with Docker or Docker-compose by any stretch of the imagination.
I promised I’d do a favour to a friend, and I built a website using grav and docker-compose. I followed the intructions on how to get started with grav, and had it running, just needed a few finished touches, before I could move it to a server and deploy it.
Alas, I did something to the docker-compose file that broke the image. Now when it runs, I am greeted by “set a new admin account” page.
However, I can see that I still have the files (outside docker) locally. They are under a folder app which in turn has pages and within it, I can see my actual pages. Now I admit, that it looks like a mess, because there’s stuff that is missing (aka pages I had finished) so I suspect that’s a snapshot of what I had done, but not the latest version of it. And, regrettably, I didn’t use git to commit and save the progress.
For example, under my app directory I can see www/user/pages/ which has empty new pages (01.home and 02.typography). At this point I accept I’ve lost all the work I did in the past few months, and I’ll have to recreate it.
What I am trying to understand and haven’t figured is:
- where is grav expecting to find the data I’m mounting?
- assuming I have a directory
appoutside docker, where should I mount it?
For example, when I bash into the running docker container, I see:
- app/www/public (seems to be pointing to
config) - config/www/user
- var/www/html
So for example, assume the following docker-compose.yaml and a local directory app in the host system,
---
version: '3'
services:
grav:
image: lscr.io/linuxserver/grav:latest
container_name: grav
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
volumes:
- ./app:/config
ports:
- 80:80
restart: unless-stopped
Should it be pointing to config???
Any help, hints and tips are greatly appreciated!