Skip to content
This repository has been archived by the owner on Nov 11, 2021. It is now read-only.

Commit

Permalink
✨ Adds agent secret support (#31)
Browse files Browse the repository at this point in the history
* Set the Agent Secret environment variable

* Update portainer.sh

* Update README.md

* Update portainer.sh

* fixing the location of the export command

* Update run

* Update README.md

* 🔥 Revert unrelated changes

* 👕 Fix lint warnings

* 👕 Remove empty default value

* I failed at a rebase... need more coffee

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
  • Loading branch information
jacoknapp and frenck authored Feb 25, 2020
1 parent 9278678 commit f446f69
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ The private key file to use for SSL.

**Note**: _The file MUST be stored in `/ssl/`, which is the default_

### Option: `agent_secret`

An option to set a shared agent secret. Must also be set in the remote agent
as an Environment variable.

### Option: `leave_front_door_open`

Adding this option to the add-on configuration allows you to disable
Expand Down
1 change: 1 addition & 0 deletions portainer/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"ssl": "bool",
"certfile": "str",
"keyfile": "str",
"agent_secret": "str",
"leave_front_door_open": "bool?"
}
}
5 changes: 5 additions & 0 deletions portainer/rootfs/etc/services.d/portainer/run
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
# ==============================================================================
declare -a options

if bashio::config.has_value 'agent_secret' ; then
bashio::log.info 'Setting the Agent Secret'
export AGENT_SECRET=$(bashio::config 'agent_secret')
fi

bashio::log.info 'Starting Portainer...'

options+=(--data /data)
Expand Down

0 comments on commit f446f69

Please sign in to comment.