add docker-compose

master
adb 4 years ago
parent 81c437ce16
commit baf1e2cc48

1
.gitignore vendored

@ -1 +1,2 @@
./accessToken.json* ./accessToken.json*
node_app/media

@ -0,0 +1,13 @@
version: '3'
services:
node:
image: node
container_name: mastodon_meme_bot
restart: always
volumes:
- ./node_app/:/home/node/app/
- ./node_logs/:/var/log/
working_dir: /home/node/app/
environment:
- NODE_ENV=production
command: sh -c 'npm i && nodejs main.js'

@ -6,7 +6,7 @@ const baseUrl = "https://social.cybre.town";
const memeAPI = "http://redditapi.adb.sh/api/v1/"; const memeAPI = "http://redditapi.adb.sh/api/v1/";
const subreddits = ["r/programmerhumor/random"]; const subreddits = ["r/programmerhumor/random"];
const allowedMedia = ["jpg", "jpeg", "gif", "png"]; const allowedMedia = ["jpg", "jpeg", "gif", "png"];
const interval = 1000*60*60; const interval = 1000*60;
let tokenHandler = new MastodonTokenHandler(baseUrl); let tokenHandler = new MastodonTokenHandler(baseUrl);
tokenHandler.getAccessToken((accessToken) => { tokenHandler.getAccessToken((accessToken) => {
Loading…
Cancel
Save