Closed RedTedRedemption closed 3 years ago
It sounds like you have permissions issues
@angrycuban13 Docker can write to that dir. This issue occurs even when mongodb is not given any volumes to mount
The error is a permissions error. Docker might be able to write but the user that's running as Petio might not.
@angrycuban13 Then it's an issue within the container - a bug. The container can write out to the host system (and it doesn't work even if it is configured to write only within the container) and I'm using the sample docker-compose file.
You have to go to the db directory on the host and run chown with the uid,gid if the user that's in your docker-compose. This is actually an issue with the mongo dockerfile not handling permissions when running the container as a different user.
what would that uuid/gid be? Also, docker-compose is running as root in my case. Docker runs as root on my system
Our example provides PUID/PGID variables if you're using an .env file with those variables filled in. If you're not using an .env file replace the PUID/PGID on the compose with that if your user.
Petio is unable to connect to the mongodb container spun up by the docker-compose file provided in the Petio wiki
To Reproduce
Expected Behavior The db test should succeed and allow the user to continue configuring the application
Logs and notes
Upon investigation, it appears that the mongodb container in the stack is crashing with the following error:
{"t":{"$date":"2021-04-26T06:26:50.586+00:00"},"s":"E", "c":"STORAGE", "id":20557, "ctx":"initandlisten","msg":"DBException in initAndListen, terminating","attr":{"error":"IllegalOperation: Attempted to create a lock file on a read-only directory: /data/db"}}