doc: Update salt-api documentation

This commit is contained in:
Carlos Álvaro
2020-10-16 18:12:20 +02:00
parent 581808b8fa
commit c0ee88e620
2 changed files with 11 additions and 3 deletions

View File

@@ -166,7 +166,7 @@ rest_cherrypy:
``` ```
The container exposes port `8000` by default, although you can map this port to whatever port you like in The container exposes port `8000` by default, although you can map this port to whatever port you like in
your `docker run` command or in your `docker-compose.yml` file. your `docker run` command:
```sh ```sh
docker run --name salt_stack --detach \ docker run --name salt_stack --detach \
@@ -179,13 +179,16 @@ docker run --name salt_stack --detach \
cdalvaro/docker-salt-master:3001.1 cdalvaro/docker-salt-master:3001.1
``` ```
If you choose using the [docker-compose.yml](docker-compose.yml) to manage your salt-master instance,
uncomment salt-api settings to enable and configure the service.
By default, user `salt_api` is created and you can set its password by setting the environment variable By default, user `salt_api` is created and you can set its password by setting the environment variable
`SALT_API_USER_PASS`. `SALT_API_USER_PASS`.
You can also change the salt-api _username_ by setting `SALT_API_USER`. You can also change the salt-api _username_ by setting `SALT_API_USER`.
It is possible to disable this user by explicitly setting this variable to an empty string: `SALT_API_USER=''` if you are going to use an `LDAP` server. It is possible to disable this user by explicitly setting this variable to an empty string: `SALT_API_USER=''` if you are going to use an `LDAP` server.
As a security measure, if `SALT_API_USER_PASS` is set to `true` and you don't disable `SALT_API_USER`, As a security measure, if `SALT_API_SERVICE_ENABLED` is set to `true` and you don't disable `SALT_API_USER`,
you'll be required to set `SALT_API_USER_PASS`. Otherwise initialization will fail and your Docker image won't work. you'll be required to set `SALT_API_USER_PASS`. Otherwise initialization will fail and your Docker image won't work.
With all that set, you'll be able to provide your _salt-api_ custom configuration by creating the `salt-api.conf` With all that set, you'll be able to provide your _salt-api_ custom configuration by creating the `salt-api.conf`

View File

@@ -12,6 +12,8 @@ services:
ports: ports:
- "4505:4505" - "4505:4505"
- "4506:4506" - "4506:4506"
### salt-api port
# - "8000:8000"
healthcheck: healthcheck:
test: ["CMD", "/usr/local/sbin/healthcheck"] test: ["CMD", "/usr/local/sbin/healthcheck"]
start_period: 30s start_period: 30s
@@ -20,5 +22,8 @@ services:
- TIMEZONE=Europe/Madrid - TIMEZONE=Europe/Madrid
- USERMAP_UID=1000 - USERMAP_UID=1000
- USERMAP_GID=1000 - USERMAP_GID=1000
- SALT_LOG_LEVEL=info - SALT_LOG_LEVEL=info
### salt-api settings
# - SALT_API_SERVICE_ENABLED=true
# - SALT_API_USER=salt_api
# - SALT_API_USER_PASS=4wesome-Pass0rd