Merge branch 'master' of ssh://github.com/CBenni/beebot
This commit is contained in:
commit
72110bd4f8
3 changed files with 37 additions and 1 deletions
23
Dockerfile
Normal file
23
Dockerfile
Normal file
|
@ -0,0 +1,23 @@
|
|||
FROM ubuntu
|
||||
MAINTAINER Styler
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
COPY package*.json ./
|
||||
|
||||
RUN apt-get update && apt-get -qq -y install curl
|
||||
RUN curl -sL https://deb.nodesource.com/setup_9.x | bash -
|
||||
RUN apt-get install -y \
|
||||
nodejs \
|
||||
libcairo2-dev \
|
||||
libjpeg8-dev \
|
||||
libpango1.0-dev \
|
||||
libgif-dev \
|
||||
build-essential \
|
||||
g++
|
||||
|
||||
RUN npm install
|
||||
|
||||
EXPOSE 3002
|
||||
COPY . .
|
||||
|
||||
CMD [ "npm", "start" ]
|
11
README.md
11
README.md
|
@ -13,3 +13,14 @@ Then copy the `config.default.json` file to `config.json`, enter your credential
|
|||
## Usage
|
||||
Add the bot to your discord server with the correct privileges and then run `/bee :emote:`
|
||||
The bot spawns an HTTP server on port 3002 on localhost, so you can use that - `http://host/bee?url=<url>`
|
||||
|
||||
## Docker
|
||||
|
||||
### Build the container
|
||||
You can build the container with the following command `npm run docker`
|
||||
|
||||
### Run the image
|
||||
Running your image with -d runs the container in detached mode, leaving the container running in the background. The -p flag redirects a public port to a private port inside the container. Run the image you previously built:
|
||||
```bash
|
||||
$ docker run -p 3002:3002 -d beebot:latest
|
||||
```
|
|
@ -4,7 +4,9 @@
|
|||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"start": "node index.js",
|
||||
"docker": "docker build -t beebot ."
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
|
|
Reference in a new issue