There are 2 problems here:
- Your app definition is incorrect (particularly around "Command override")
- You could fix that part and Postgres would start, but you will run into a persistent storage issue. Azure ContainerApps today only supports AzureFiles SMB shares for persistent storage. However, Postgres requires hardlinks and AzureFiles SMB doesn't support hardlinks. So you won't be able to mount a persistent storage that works for postgres. Once ContainerApps can mount AzureFiles NFS shares, this will work.
Regarding the first problem, the "Command override" is for overriding the command running in your docker image, not the docker command itself.
So those values will need to be put in the environment variables section below:
like:

or using the azure cli
az containerapp create \
--name $POSTGRES_INSTANCE_NAME \
--resource-group $RESOURCE_GROUP \
--environment $CONTAINERAPPS_ENVIRONMENT \
--image docker.io/postgres:15 \
--secrets pgpass="$POSTGRES_PASSWORD" \
--env-vars POSTGRES_USER="$POSTGRES_USER" POSTGRES_DB="$POSTGRES_DB" POSTGRES_PASSWORD=secretref:pgpass \
--transport tcp \
--target-port 5432 \
--ingress external \
--min-replicas 1 \
--max-replicas 1
you could change --ingress external
to --ingress internal
then deploy pgadmin on the same environment. Then pgadmin should be able to reach postgres on $POSTGRES_INSTANCE_NAME:5432
to deploy pgadmin
az containerapp create \
--name pgadmin \
--resource-group $RESOURCE_GROUP \
--environment $CONTAINERAPPS_ENVIRONMENT \
--image dpage/pgadmin4:6.15 \
--secrets pgpass="$PGADMIN_PASSWORD" \
--env-vars PGADMIN_DEFAULT_EMAIL="$PGADMIN_EMAIL" PGADMIN_LISTEN_PORT="8080" PGADMIN_DEFAULT_PASSWORD=secretref:pgpass \
--transport http \
--target-port 8080 \
--ingress external \
--min-replicas 1 \
--max-replicas 1