Skip to content
Snippets Groups Projects
Commit c8e8ca74 authored by PICHOU Kyâne's avatar PICHOU Kyâne Committed by PICHOU Kyâne
Browse files

Manage mattermost giphy token at startup (and not when building docker image)

parent c110c2fb
No related branches found
No related tags found
1 merge request!5CheckMK stable image
giphy_mat_hooker.conf
# Instructions
You should set the `giphy_mat_hooker.conf` file.
```
cp giphy_mat_hooker.conf.template giphy_mat_hooker.conf
```
Change the `token` value with the mattermost key
# vim:set sw=4 ts=4 sts=4 ft=perl expandtab:
{
####################
# Hypnotoad settings
......@@ -6,7 +5,7 @@
# see http://mojolicio.us/perldoc/Mojo/Server/Hypnotoad for a full list of settings
hypnotoad => {
# array of IP addresses and ports you want to listen to
listen => ['http://127.0.0.1:80'],
listen => ['http://0.0.0.0:8080'],
},
######################
......@@ -17,7 +16,7 @@
# The default is the dev key from Giphy, which is rate-limited.
# See https://github.com/Giphy/GiphyAPI to know how to get
# a production API key
apikey => 'dc6zaTOxFJmzC',
apikey => '{{%APIKEY%}}',
# Mattermost token
# When you create a slash command in mattermost, you get a token.
......@@ -25,5 +24,5 @@
# only.
# If you do not provide a token, it will check for parameters that
# Mattermost usually send with a slash command.
token => 'something'
token => '{{%TOKEN%}}'
};
#!/bin/bash
sed -i "s/{{%TOKEN%}}/$MATTERMOST_TOKEN/g" giphy_mat_hooker.conf
sed -i "s/{{%APIKEY%}}/$GIPHY_APIKEY/g" giphy_mat_hooker.conf
carton exec hypnotoad script/giphy_mat_hooker
while :; do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment