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

Use another giphy integration

parent bbb2ce60
No related branches found
No related tags found
1 merge request!5CheckMK stable image
FROM perl
FROM python:2.7
MAINTAINER Kyâne PICHOU kyane@kyane.fr
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 apt-get update && \
apt-get install -y \
python-pip \
python-dev \
build-essential && \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
RUN git clone https://git.framasoft.org/framasoft/giphymathooker.git /giphymathooker
WORKDIR /giphymathooker
RUN git clone https://github.com/numberly/mattermost-integration-giphy.git /mattermost-giphy
WORKDIR /mattermost-giphy
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
RUN python setup.py install
ENTRYPOINT python run.py
EXPOSE 8080
ENTRYPOINT ["/giphymathooker/init.sh"]
{
####################
# 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://0.0.0.0:8080'],
},
######################
# 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 => '{{%APIKEY%}}',
# 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 => '{{%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
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