Skip to content
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

pictures missing after restart #1

Closed
subzer047 opened this issue Mar 5, 2017 · 3 comments
Closed

pictures missing after restart #1

subzer047 opened this issue Mar 5, 2017 · 3 comments
Assignees

Comments

@subzer047
Copy link

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
Copy link
Member

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:

  • ".log:/shopware/var/log"
  • ".files:/shopware/files"
  • ".media:/shopware/media"
  • ".community-plugins:/shopware/engine/Shopware/Plugins/Community"
  • ".cache/:/shopware/web/cache/"

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

@chudomir-delchev-dnh chudomir-delchev-dnh self-assigned this Mar 6, 2017
@subzer047
Copy link
Author

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

Thank you!

@chudomir-delchev-dnh
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants