update hubot

This commit is contained in:
kev 2022-06-17 15:33:31 +08:00
parent 2de56efd2c
commit 827622d354
5 changed files with 28 additions and 76 deletions

View File

@ -2,7 +2,7 @@
# Dockerfile for hubot
#
FROM alpine:3
FROM alpine:3.16
MAINTAINER EasyPi Software Foundation
ENV HUBOT_NAME=Hubot
@ -11,9 +11,9 @@ ENV HUBOT_DESCRIPTION=$HUBOT_NAME-$HUBOT_ADAPTER
ENV HUBOT_SLACK_TOKEN=
RUN set -xe \
&& apk add --update ca-certificates nodejs nodejs-npm python3 \
&& apk add --update bash ca-certificates nodejs npm python3 \
&& npm install -g yo generator-hubot \
&& adduser -s /bin/sh -D hubot
&& adduser -s /bin/bash -D hubot
USER hubot
WORKDIR /home/hubot
@ -35,7 +35,7 @@ RUN set -xe \
VOLUME /home/hobot \
/usr/local/bin \
/usr/lib/python3.8/site-packages
/usr/lib/python3.10/site-packages
EXPOSE 8080

View File

@ -9,16 +9,18 @@ Hubot's power comes through [scripts][2].
## docker-compse.yml
```yaml
hubot:
image: vimagick/hubot
ports:
- "8080:8080"
volumes:
- ./data:/home/hubot/scripts
environment:
- HUBOT_SLACK_TOKEN=xoxb-xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxx
- HUBOT_AUTH_ADMIN=UXXXXXXXX
restart: always
version: "3.8"
services:
hubot:
image: vimagick/hubot
ports:
- "8080:8080"
volumes:
- ./data:/home/hubot/scripts
environment:
- HUBOT_SLACK_TOKEN=xoxb-xxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxx
- HUBOT_AUTH_ADMIN=UXXXXXXXX
restart: unless-stopped
```
- Click [this][3] to generate `HUBOT_SLACK_TOKEN`.

View File

@ -1,42 +0,0 @@
#
# Dockerfile for hubot-arm
#
FROM arm32v7/alpine:3
MAINTAINER EasyPi Software Foundation
ENV HUBOT_NAME=Hubot
ENV HUBOT_ADAPTER=slack
ENV HUBOT_DESCRIPTION=$HUBOT_NAME-$HUBOT_ADAPTER
ENV HUBOT_SLACK_TOKEN=
RUN set -xe \
&& apk add --update ca-certificates nodejs nodejs-npm python3 \
&& npm install -g yo generator-hubot \
&& adduser -s /bin/sh -D hubot
USER hubot
WORKDIR /home/hubot
RUN set -xe \
&& yo hubot --name $HUBOT_NAME \
--description $HUBOT_DESCRIPTION \
--adapter $HUBOT_ADAPTER \
--defaults \
&& npm install --save hubot-$HUBOT_ADAPTER \
htmlparser \
moment \
querystring \
soupselect \
underscore \
underscore.string \
url \
&& sed -i -r 's/^\s+#//' scripts/example.coffee
VOLUME /home/hobot \
/usr/local/bin \
/usr/lib/python3.8/site-packages
EXPOSE 8080
CMD ["./bin/hubot", "--adapter", "slack"]

View File

@ -1,10 +0,0 @@
hubot:
image: easypi/hubot-arm
ports:
- "8080:8080"
volumes:
- ./data:/home/hubot/scripts
environment:
- HUBOT_SLACK_TOKEN=xoxb-xxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxx
- HUBOT_AUTH_ADMIN=UXXXXXXXX
restart: unless-stopped

View File

@ -1,10 +1,12 @@
hubot:
image: vimagick/hubot
ports:
- "8080:8080"
volumes:
- ./data:/home/hubot/scripts
environment:
- HUBOT_SLACK_TOKEN=xoxb-xxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxx
- HUBOT_AUTH_ADMIN=UXXXXXXXX
restart: unless-stopped
version: "3.8"
services:
hubot:
image: vimagick/hubot
ports:
- "8080:8080"
volumes:
- ./data:/home/hubot/scripts
environment:
- HUBOT_SLACK_TOKEN=xoxb-xxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxx
- HUBOT_AUTH_ADMIN=UXXXXXXXX
restart: unless-stopped