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

Add giphy mattermost integration

parent 5c39174b
No related branches found
No related tags found
No related merge requests found
giphy_mat_hooker.conf
FROM perl
MAINTAINER Kyâne PICHOU kyane@kyane.fr
# Install CPAN and Carton
RUN apt-get update \
&& apt-get -y install build-essential libssl-dev \
&& curl -L http://cpanmin.us | perl - App::cpanminus \
&& cpanm Carton
RUN git clone https://git.framasoft.org/framasoft/giphymathooker.git /giphymathooker
WORKDIR /giphymathooker
RUN carton install
COPY giphy_mat_hooker.conf /giphymathooker/giphy_mat_hooker.conf
COPY init.sh /giphymathooker/init.sh
RUN chmod +x /giphymathooker/init.sh
EXPOSE 8080
ENTRYPOINT ["/giphymathooker/init.sh"]
# 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
####################
# 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'],
},
######################
# Application settings
######################
# Giphy API key.
# 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',
# Mattermost token
# When you create a slash command in mattermost, you get a token.
# Put it here if you want that service to be available to your team
# only.
# If you do not provide a token, it will check for parameters that
# Mattermost usually send with a slash command.
token => 'something'
};
#!/bin/bash
carton exec hypnotoad script/giphy_mat_hooker
while :; do
sleep 300
done
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