public inbox for [email protected]  
help / color / mirror / Atom feed
From: Adrian Klaver <[email protected]>
To: Zac Warham <[email protected]>
To: [email protected] <[email protected]>
Subject: Re: Changing postgres User
Date: Mon, 14 Oct 2024 14:46:55 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <ME3P282MB33285BBA32907655287F4AD9B7442@ME3P282MB3328.AUSP282.PROD.OUTLOOK.COM>
References: <ME3P282MB33285BBA32907655287F4AD9B7442@ME3P282MB3328.AUSP282.PROD.OUTLOOK.COM>

On 10/14/24 13:11, Zac Warham wrote:
> Hi,
> 
> We are trying to setup a postgresql Docker container alongside pgadmin 
> and caddy for use in the PrairieLearn student testing software. Our main 
> set back is that the PrairieLearn production environment user runs as 
> user 1001:1001 and as such we have had to rename the postgres user 
> within Linux to 1001 and alter the credentials management significantly.

Why?

Per:

https://www.postgresql.org/docs/current/app-initdb.html

You can have the initdb create the cluster as any user:

"-U username
--username=username

     Sets the user name of the bootstrap superuser. This defaults to the 
name of the operating-system user running initdb.
"

> 
> We are currently brainstorming some better ways but if anyone has any 
> suggestions on easier ways to make these changes then we would 
> appreciate them. The code is open source and can be viewed here - 
> https://github.com/PrairieLearn/PrairieLearn/pull/10713 
> <https://github.com/PrairieLearn/PrairieLearn/pull/10713;
> 
> Thanks,
> Zac

-- 
Adrian Klaver
[email protected]







view thread (4+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Changing postgres User
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox