dnhsoft / docker-shopware

Shopware ready to use as a Docker container
MIT License
28 stars 9 forks source link

pictures missing after restart #1

Closed subzer047 closed 7 years ago

subzer047 commented 7 years ago

after running restart-containers.sh all pictures in media directory are missing actually I use SW 5.2.20 with php7 but I had this problem already since 5.2.12

chudomir-delchev-dnh commented 7 years ago

Hello - I guess you need to mount the directories.

In local or production development we always create volumes for certain Shopware directories. Here are the volumes from a sample docker-file:

volumes:

Then even when you remove the image, you will have the log, the files and media and the downloaded community plugins.

subzer047 commented 7 years ago

Great Idea to mount the media directory! I didn't think about that way.

Thank you!

chudomir-delchev-dnh commented 7 years ago

No probs :) Sometimes, when you use mounted directories, you may have a problem with their rights inside the container. I.e. if you go into the container shell, they will not be owned by www-data.

If this happens, simply call /swtools/prepare-dirs.sh inside the container.

or docker-compose exec shop /swtools/prepare-dirs.sh