Repository: goauthentik/authentik
Pull request: website/docs: separate docker steps
Separated the steps for generating a password and then writing it to the .env file. The steps were not working on a Mac when all together.

Resolves #5186 



Problem statement:
Docs: make the password generation section in the Docker install docs more clear for Mac users
The current code block for installing a password generator, then generating a key and writing it to the .env file, is best broken into separate steps on a Mac.

Hints from issue discussion:

Commit message: fixed formatting harder

Patch to review:
diff --git a/website/docs/installation/docker-compose.md b/website/docs/installation/docker-compose.md
index 8185f335c28e..bb4787efbc60 100644
--- a/website/docs/installation/docker-compose.md
+++ b/website/docs/installation/docker-compose.md
@@ -14,13 +14,18 @@ This installation method is for test-setups and small-scale production setups.
 
 Download the latest `docker-compose.yml` from [here](https://goauthentik.io/docker-compose.yml). Place it in a directory of your choice.
 
-If this is a fresh authentik install run the following commands to generate a password:
+If this is a fresh authentik installation, you need to generate a password. If you don't already have a password generator installed, you can run this command to install **pwgen**, a popular generator:
 
 ```shell
 # You can also use openssl instead: `openssl rand -base64 36`
 sudo apt-get install -y pwgen
 # Because of a PostgreSQL limitation, only passwords up to 99 chars are supported
 # See https://www.postgresql.org/message-id/09512C4F-8CB9-4021-B455-EF4C4F0D55A0@amazon.com
+```
+
+Next, run the following commands to generate a password and write it to your `.env` file:
+
+```shell
 echo "PG_PASS=$(pwgen -s 40 1)" >> .env
 echo "AUTHENTIK_SECRET_KEY=$(pwgen -s 50 1)" >> .env
 # Skip if you don't want to enable error reporting


Code review comments:
diff_hunk: @@ -14,13 +14,18 @@ This installation method is for test-setups and small-scale production setups.
 
 Download the latest `docker-compose.yml` from [here](https://goauthentik.io/docker-compose.yml). Place it in a directory of your choice.
 
-If this is a fresh authentik install run the following commands to generate a password:
+If this is a fresh authentik installation, you need to generate a password. If you don't already have a password generator installed, you can run this command to install **pwgen**, a popular generator:
 
 ```shell
 # You can also use openssl instead: `openssl rand -base64 36`
 sudo apt-get install -y pwgen
 # Because of a PostgreSQL limitation, only passwords up to 99 chars are supported
 # See https://www.postgresql.org/message-id/09512C4F-8CB9-4021-B455-EF4C4F0D55A0@amazon.com
+```
+
+Next, run the following commands to generate a password and write it to your `.env` file:
+
+```shell
 echo "PG_PASS=$(pwgen -s 40 1)" >> .env
path: website/docs/installation/docker-compose.md
text: @user1:
Maybe we want to separate the generation from the echoing? I remember there was some trouble with zsh on your machine with these commands 

@author:
Oh, I thought that was what I separated, but I see now (I think) that both generation and echoing are happening here:
`echo "PG_PASS=$(pwgen -s 40 1)" >> .env`
`echo "AUTHENTIK_SECRET_KEY=$(pwgen -s 50 1)" >> .env`

How do we separate those?

@user1:
Separate it would be 

```
PG_PASS=$(pwgen -s 40 1)
echo "PG_PASS=$PG_PASS" >> .env
```

which actually isn't much clearer

@author:
I'm going to go ahead and merge this now, without yet separating the generate and write steps, and do some more testing later.