Data directory "/var/lib/postgresql/data" has wrong ownership... on Linux?

don’t worry.

Btw. If you ever have the situation that you end up with variables in your compose template, you can trick envsubst in only using variables that actualy exist in env:

# param 1: docker-compose template file
# param 2: project name of the deployment
define deploy-compose
        envsubst "$$(env | sed -e 's/=.*//' -e 's/^/\$$/g')" < $(1) \
                |tee debug.yaml \
                |docker-compose --project-name $(2) -f - up -d  && rm debug.yaml;
endef

Maybe this might be usefull for you…

2 Likes