-
Notifications
You must be signed in to change notification settings - Fork 91
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
[SUGGESTION] Remove /var/ folder from composer installation in docker volume #202
Comments
Can you explain, how do you did this exclusion? |
@mediaessenz I changed the volumes inside the docker-compose.yaml from
to
This way the app folder itself and therefore the /var/ folder does sync itself with the docker system. |
Thank you for the explaination. To bad that there is no easier way to exclude some files or subfolder, like it is possible in eg. .gitignore files |
You can do this: version: '3.7'
services:
app:
volumes:
- ./app:/app:cached
- app-cache:/app/var:nocopy
volumes:
app-cache: |
@hhoechtl Does this setup work for you? |
Yes that works, but you have to do |
@hhoechtl can you put this inside a Dockerfile so this is executed on container creation? |
Of course you could. I'm personally not supporting TYPO3 anymore.
Am Do., 26. März 2020 um 08:46 Uhr schrieb TimoWinkler <
[email protected]>:
… @hhoechtl <https://github.com/hhoechtl> can you put this inside a
Dockerfile so this is executed on container creation?
A manual chown would not be a great solution.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#202 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGXLBG6DVS65NAOJT7W4UTRJMB4DANCNFSM4JNMZBAQ>
.
--
*Onedrop GmbH & Co. KG*
Dr.-Leo-Ritter-Str. 2
93049 Regensburg
Tel. +49 (0) 941 / 206 064 - 40
1drop.de
[email protected] <[email protected]>
http://www.facebook.com/onedropsolutions
http://twitter.com/1drop
|
@hhoechtl I did some reading and I don't think this stops synchronising the /var folder. |
Not it won't stop the synchronisation, but as you don't make changes locally in the |
@hhoechtl
Additional I added your suggestion to my docker-compose.yml:
After all I rebuild the app container and started all again and get this error when opening the app in the browser:
Did I forget/missunderstand something? |
Creating the directory upfront doesn't work. |
But how can I change the owner/group later? |
|
Is there also a way to do this automaticaly after "docker-compose up" with the right container name? |
We have that in our
|
I see, thanks for sharing. Any idea, why I get this errors in the backend:
When I check the owner/group of this directory inside the app container, all files inside there and the subfolder itself have application:application with 644 (files) 2775 (folder) It seems the system couldn't delete the files inside /app/var/transient/ after doing some image processing. I can see the processed file inside /app/public/fileadmin/processed/c/7/, but there is also still this old, unnecessary file /app/var/transient/preview_1066312516667750181.jpg |
After some research I found a way to fix this problem. Unfortunately it needs a TYPO3 core patch :-(
When I change it to this, it works fine:
I have no idea why this is necessary, but it seams to be a bug in TYPO3 (or PHP?). |
One more, hopefully last question to this issue: |
No a restart does not execute a command that it's not aware of. But the rights remain as long as don't recreate the named volume that is mounted. |
Cool, thanks for helping |
Is there any reason, why this volume "trick" doesn't work on a production system? |
No, but why would you care. On Linux that's just irrelevant performance wise. |
Okay, good to know :-) |
It's me again: My steps:
What's going wrong here? |
Okay, I think I have found my problem. |
Currently the TYPO3 backend is slow in docker installations. Even if a delegated volume is mounted.
If TYPO3 is setup as composer we can stop mounting the /var/ folder to the docker container.
I ran some Tests after removing the folder from mounting to docker and it runs a lot faster, especially the backend.
There might also be reasons to remove the typo3temp folder from mounting inside the docker container, but currently I don't even know what or why TYPO3 stores still data inside that directory.
The text was updated successfully, but these errors were encountered: