Skip to content

Commit

Permalink
fix enumerations/indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mrckndt committed Apr 22, 2021
1 parent 16d8e16 commit d09edec
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions docs/creation-of-nonsuperuser.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ executable while Mattermost is running.
**NOTE:** Commands with a **$** prefix denote those are executed as user, **#** as root and commands without a prefix are database commands.
We assume the database name is *mattermost* and the database user *mmuser*.

1. Find out the name or id of the PostgreSQL container
### 1. Find out the name or id of the PostgreSQL container
To get either the name or the id of the running PostgeSQL container we can use `$ sudo docker ps`.

2. Attaching to the database container
### 2. Attaching to the database container
`$ sudo docker exec -it POSTGRES_CONTAINER_NAME/ID /bin/sh`

3. Connecting to the database
### 3. Connecting to the database
```
# psql DATABASE_NAME USERNAME
e.g.
# psql mattermost mmuser
```

4. Checking if the Mattermost user is a superuser
### 4. Checking if the Mattermost user is a superuser
The following PostgreSQL command will print a list of the present users and its attributes.
```
\du
Expand All @@ -35,7 +35,7 @@ A possible output can look like the following:
mmuser | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
```

5. Creating a new `superuser` and changing existing role attributes
### 5. Creating a new `superuser` and changing existing role attributes
**ATTENTION:** It's strongly recommended to create a database prior alteration. This can be done by stopping the database
and backup the PostgreSQL data path at filesystem level and/or to use `pg_dumpall`. For this attach to the running PostgreSQL
container described in step 2 and execute:
Expand All @@ -58,4 +58,4 @@ GRANT ALL PRIVILEGES ON DATABASE mattermost to mmuser;
ALTER ROLE mmuser NOBYPASSRLS NOREPLICATION NOCREATEDB NOCREATEROLE NOSUPERUSER;
```

Even though you can apply the changes in a non-downtime it's required to restart the containers.
Even though you can apply the changes in a non-downtime it's required to restart the containers.
6 changes: 3 additions & 3 deletions docs/issuing-letsencrypt-certificate.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ This guide assumes you're inside the mattermost-docker directory but if using ab
(e.g. /home/admin/mattermost-docker instead of `${PWD}`) it doesn't matter because the paths are unique. These commands
requires that DNS records (A or CNAME) have been set and resolve to your server's external IP.

1. Issuing the certificate using the standalone authenticator (because there is no nginx yet)
### 1. Issuing the certificate using the standalone authenticator (because there is no nginx yet)
```
$ sudo docker run -it --rm --name certbot -p 80:80 \
-v "${PWD}/certs/etc/letsencrypt:/etc/letsencrypt" \
-v "${PWD}/certs/lib/letsencrypt:/var/lib/letsencrypt" \
certbot/certbot certonly --standalone -d mm.example.com
```

2. Changing the authenticator to webroot for later renewals
### 2. Changing the authenticator to webroot for later renewals

```
$ sudo docker run -it --rm --name certbot \
Expand All @@ -38,7 +38,7 @@ webroot_path = /usr/share/nginx/html,
EOF
```

3. Command for requesting renewal (Let's Encrypt certificates do have a 3 month lifetime)
### 3. Command for requesting renewal (Let's Encrypt certificates do have a 3 month lifetime)

```
sudo docker run --rm --name certbot \
Expand Down

0 comments on commit d09edec

Please sign in to comment.