forked from mirrors/mattermost-docker
fix enumerations/indentation
This commit is contained in:
parent
16d8e165c2
commit
d09edec595
@ -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
|
||||
@ -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:
|
||||
@ -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.
|
||||
|
@ -8,7 +8,7 @@ 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" \
|
||||
@ -16,7 +16,7 @@ $ sudo docker run -it --rm --name certbot -p 80:80 \
|
||||
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 \
|
||||
@ -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 \
|
||||
|
Loading…
Reference in New Issue
Block a user