From c0ee88e62097606bdbffa255fb67ff5fc81d7c9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20=C3=81lvaro?= Date: Fri, 16 Oct 2020 18:12:20 +0200 Subject: [PATCH] doc: Update salt-api documentation --- README.md | 7 +++++-- docker-compose.yml | 7 ++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3baf4da..e8816a1 100644 --- a/README.md +++ b/README.md @@ -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 -your `docker run` command or in your `docker-compose.yml` file. +your `docker run` command: ```sh docker run --name salt_stack --detach \ @@ -179,13 +179,16 @@ docker run --name salt_stack --detach \ 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 `SALT_API_USER_PASS`. 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. -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. With all that set, you'll be able to provide your _salt-api_ custom configuration by creating the `salt-api.conf` diff --git a/docker-compose.yml b/docker-compose.yml index 49d94ae..cdf1906 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,6 +12,8 @@ services: ports: - "4505:4505" - "4506:4506" + ### salt-api port + # - "8000:8000" healthcheck: test: ["CMD", "/usr/local/sbin/healthcheck"] start_period: 30s @@ -20,5 +22,8 @@ services: - TIMEZONE=Europe/Madrid - USERMAP_UID=1000 - USERMAP_GID=1000 - - SALT_LOG_LEVEL=info + ### salt-api settings + # - SALT_API_SERVICE_ENABLED=true + # - SALT_API_USER=salt_api + # - SALT_API_USER_PASS=4wesome-Pass0rd