wyveo / craftcms-docker

Craft3/Craft2 CMS Docker base (Nginx, PHP-FPM 8, PostgreSQL/MariaDB, Redis)
https://hub.docker.com/r/wyveo/craftcms-docker
MIT License
100 stars 31 forks source link

Editing Files #7

Closed modulareverything closed 6 years ago

modulareverything commented 7 years ago

Apologies at this seemingly obvious question, I'm new to Docker and after a few attempts at setting up my own image, I've decided to give this one a go.

I'm confused how I access/edit the Craft folder? How do I add new plugins, edit templates, etc, etc.


As a further question, whenever I run docker-compose down it destroys my database — how do I make sure that stays persistent?

Thanks 👍

jcuffney commented 7 years ago

+1, aside from doing something like docker exec -it <container_web> /bin/bash and then going to /usr/share/nginx/ it dosen't seem obvious to me either.

modulareverything commented 7 years ago

@jwc2790 more than I was aware of, but still doesn't help for a development environment.

@colinwilson can you weigh in on this?

jcuffney commented 7 years ago

@chrishiam or @colinwilson any updates here?

modulareverything commented 7 years ago

@jwc2790 I ended up scrapping this and using something simpler with Apache. It doesn't have all the bells and whistles like this, but it works. Happy to send on the structure if you need it?

askogrand commented 7 years ago

@chrishiam you can use docker-compose stop to stop the container without destroying the volume. The down command will destroy the postgres database, that will otherwise be persistent.

If you want to install plugins or add templates, you may want to use a docker-sync strategy (http://docker-sync.io/) to let you sync a local folder with docker. Otherwise, you may be happier with just a local install of craft.

artus commented 6 years ago

This docker-compose deployment now includes named volumes. By doing so, you can edit the contents of the craftcms templates folder by inspecting the correct volume en manually going to the physical location on drive:

$ docker volume ls
> You will get a list of volumes (you want the craftcms-data volume)
$ docker volume inspect craftcms-data
> You will get the physical path tho your volume
$ cd <the physical path>

This issue is solved by the named volumes, I vote to close it.

colinwilson commented 6 years ago

Resolved by 45046bd