Open peaklabs-dev opened 2 weeks ago
@peaklabs-dev i have never used mac os, but does it use docker desktop at all?
if so whats here? Docker Desktop, "Settings > Resources > File sharing > Virtual file shares.
@djsisson It is a difficult problem (very know if you develop on MacOS). In the file sharing there is nothing (I added nothing, also will not work if you want to add something, so you could not add /data
or so that is not possible) see details in my fix that seems to work except for MongoDB: https://github.com/coollabsio/coolify/pull/3542. I also use Orbstack, a much better Docker experience for MacOS people.
Error Message and Logs
When deploying a MongoDB on MacOS in development, the following error occurs:
-> I think this only happens on MacOS because of the strict filesystem restrictions, but I could be wrong.
Steps to Reproduce
-> Discord thread: https://discord.com/channels/459365938081431553/1291781262016774198
Coolify Version
v4.0.0-beta.360
Additional Information
I investigated this Bug for a few hours today and found the following things.
https://github.com/coollabsio/coolify/blob/5d62a46a16f252e6ece4d25fe56838e99883d91b/app/Actions/Database/StartMongodb.php#L110-L115
-> This approach uses the --volume syntax, which is more lenient in creating directories that don't exist (and it works), the other syntax with --mount is more strict, directory must exist for it to work. But when I check the directory is present in both scenarios.
Note I added one more line in addition to the commands to make sure the directory is present: https://github.com/coollabsio/coolify/blob/5d62a46a16f252e6ece4d25fe56838e99883d91b/app/Actions/Database/StartMongodb.php#L28-L31 I added this line to the commands
Same thing happens for the Postgres config:
Why does the second option work in both cases and not the first? Ofc I could just change it everywhere to the second one which works and call it a day, but I would like to investigate and know why the first option does not seem to work.