I am using the docker-compose.yml install from the official docs. I am also trying to follow the non root user info in the FAQ.
My .env and docker-compose.yml files are attached, these are straight from the docs, except the changes in the .env as needed and addition of the user for each service.
The database container fails to start with this error:
immich_postgres | chmod: changing permissions of '/var/run/postgresql': Operation not permitted
immich_postgres | The files belonging to this database system will be owned by user "postgres".
immich_postgres | This user must also own the server process.
immich_postgres |
immich_postgres | The database cluster will be initialized with locale "en_US.utf8".
immich_postgres | The default database encoding has accordingly been set to "UTF8".
immich_postgres | The default text search configuration will be set to "english".
immich_postgres |
immich_postgres | Data page checksums are enabled.
immich_postgres |
immich_postgres | initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted```
I notice that the db folder is being created as owned by root, so that is probably the issue. But how do I get around this if I want to run as non root user?
`drwxr-xr-x 2 root root 4096 Feb 27 15:27 immich_db`
.