Skip to content

Commit 258a110

Browse files
authored
Merge pull request #7 from mjpc13/main
Add Docker support
2 parents f74ab4c + 08e4e8e commit 258a110

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
npm-debug.log

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM node:lts-alpine
2+
3+
COPY package*.json ./
4+
5+
RUN npm install
6+
7+
COPY . .
8+
9+
CMD [ "node", "main.js" ]

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A lemmy bot that watches rss feeds and posts new posts from them in communities
44
This bot is made for the https://programming.dev/ communities but the source code can be modified to accomodate any community
55

66
## Prerequisites
7-
- You need to have installed node.js in order to run the bot
7+
- You need to have installed node.js or Docker in order to run the bot
88

99
## Setup
1010
1. Clone the repository
@@ -21,3 +21,15 @@ LEMMY_PASSWORD="" // The bot password
2121
I recommend installing something like [forever.js](https://www.npmjs.com/package/forever) which will make it start back up again if it errors at some point
2222

2323
If you run into issues feel free to dm me on Matrix [here](https://matrix.to/#/@ategon:matrix.org)
24+
25+
## Setup with Docker
26+
1. Clone the repository
27+
2. Create an account in the instance you want the bot to have as its home (just make a regular user)
28+
3. Create a file called .env in the bot folder and give it values in this format with the data in the quotes (dont add the slashes or the part after the slashes)
29+
```
30+
LEMMY_INSTANCE="" // The instance the bot account is in
31+
LEMMY_USERNAME="" // The bot username
32+
LEMMY_PASSWORD="" // The bot password
33+
```
34+
4. Change the data in config.yaml based on what you want set. Set the communities and feeds you want here
35+
5. In the project directory build the docker image by running `docker build -t <your name>/<desired_image_name>` and then launch a new container with `docker run <your name>/<desired_image_name>`

0 commit comments

Comments
 (0)