Commit f96d3986 authored by Dave Lane's avatar Dave Lane

updated recipe to fix paths and cron

parent 3e5d27e3
......@@ -61,7 +61,8 @@ RUN apt-get update -y && apt-get install -y --no-install-recommends \
python-html5lib \
python-lxml \
python-pip \
python-urllib3
python-urllib3 \
rsyslog
# grab gosu for easy step-down from root and tini for signal handling
RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
......@@ -114,7 +115,9 @@ COPY ./conf /root/conf/
RUN chmod u+x /root/conf/*.sh
# expose relevant ports
VOLUME ["/opt/wenotes/tools", "/opt/wenotes/tools/options.json"]
VOLUME ["/opt/wenotes/tools"]
VOLUME ["/opt/wenotes/logs"]
VOLUME ["/opt/wenotes/tools/options.json"]
# First, say we're doing it
RUN echo "running run.sh - /root/conf/run.sh"
......
{
"settings-url": "http://wenotes.oeru.org/resources/feed-sources.json",
"url": "http://bot:BOT_PASSWORD@couchdb2:5984",
"localcouch": "http://bot:BOT_PASSWORD@couchdb2:5984",
"couch": {
"user": "bot",
"pass": "BOT_PASSWORD",
"url": "http://couchdb2",
"port": 5984
},
"db": "mentions",
"dbfeeds": "feeds",
"dbvotes": "votes",
"avatars": "weavatars",
"server": {
"ip": "faye",
"port": 80,
"secureport": "",
"privkey": "",
"fullchain": ""
},
"logdir": "/opt/wenotes/log",
"log": {
"couchwatch": {
"level": 7,
"file": "/tmp/couchwatch.log"
},
"twitters": {
"level": 7,
"file": "/tmp/twitters.log"
},
"twitter": {
"level": 7,
"file": "/tmp/twitter.log"
},
"server": {
"level": 7,
"file": "/tmp/wenotes-server.log"
}
},
"WEnotes": {
"RocketChat": {
"subscribe": "/WEnotes/*",
"channel": "#wenotes-all",
"webhook": "https://chat.oeru.org/hooks/ROCKETCHAT_WENOTES_HASH"
}
},
"IRC": {
"botname": "WikiEducatorBot",
"botpass": "lat45long",
"ircchannel": "#wikieducator",
"RocketChat": {
"channel": "#wikieducator-irc",
"webhook": "https://chat.oeru.org/hooks/ROCKETCHAT_IRC_HASH"
}
},
"RocketChat": {
"token": "post4WEnotes",
"tag": "oeru",
"baseURL": "https://chat.oeru.org/"
},
"googleapikey": "GOOGLE_API_KEY",
"googleapiserverkey": "GOOGLE_API_SERVER_KEY",
"moodleuser": "MOODLE_USER",
"moodlepass": "MOODLE_PASSWORD",
"tags": ["wikieducator", "ocl4ed", "oeru", "wenotes", "ds4oer", "uowmun", "oeru17"],
"blacklist": ["asiangirl", "japanesa", "panties", "nipples", "stockings", "oppai", "tits", "bigtits", "japanav", "gangbang", "blowjob", "pantsu", "buenosaires", "escuelacuzque", "milf", "lingerie", "ass", "pussy"],
"fayeurl": "http://faye/faye",
"fayepass": "FAYE_PASSWORD",
"twitter": {
"consumer_key": "TWITTER_CONSUMER_KEY",
"consumer_secret": "TWITTER_CONSUMER_SECRET",
"access_token_key": "TWITTER_ACCESS_KEY",
"access_token_secret": "TWITTER_ACCESS_SECRET"
},
"gdata": {
"user": "GPLUS_USER_EMAIL",
"pass": "GPLUS_USER_PASSWORD"
},
"communities": [{"id":"110673383804329227095", "tag": "wikieducator"},
{ "id":"107652967421847253472", "tag": "sp4ed"},
{"id":"101164183090938345449", "tag": "ocl4ed"}
],
"discourse": "https://community.oeru.org",
"forums": {
"ds4oer": "https://forums.oeru.org/c/courses/ds4oer.json",
"csf101": "https://forums.oeru.org/tags/csf101.json",
"csf102": "https://forums.oeru.org/tags/csf102.json",
"csf103": "https://forums.oeru.org/tags/csf103.json",
"csf104": "https://forums.oeru.org/tags/csf104.json",
"lida101": "https://forums.oeru.org/tags/lida101.json",
"lida102": "https://forums.oeru.org/tags/lida102.json",
"lida103": "https://forums.oeru.org/tags/lida103.json",
"lida104": "https://forums.oeru.org/tags/lida104.json"
},
"bookmarks": {
"url": "https://bookmarks.oeru.org",
},
"hypothesis": {
"url": "https://hypothes.is",
},
"medium": {
"url": "https://medium.com"
}
}
{
"url": "http://bot:[couchpass]@localhost:5984",
"localcouch": "http://bot:[couchpass]@localhost:5984",
"settings-url": "http://wenotes.oeru.org/resources/feed-sources.json",
"url": "http://bot:BOT_PASSWORD@couchdb2:5984",
"localcouch": "http://bot:BOT_PASSWORD@couchdb2:5984",
"couch": {
"user": "bot",
"pass": "[couchpass]",
"url": "http://localhost",
"pass": "BOT_PASSWORD",
"url": "http://couchdb2",
"port": 5984
},
"db": "mentions",
......@@ -12,12 +13,13 @@
"dbvotes": "votes",
"avatars": "weavatars",
"server": {
"ip": "localhost",
"ip": "faye",
"port": 80,
"secureport": "",
"privkey": "",
"fullchain": ""
},
"logdir": "/opt/wenotes/log",
"log": {
"couchwatch": {
"level": 7,
......@@ -27,7 +29,11 @@
"level": 7,
"file": "/tmp/twitters.log"
},
"server": {
"twitter": {
"level": 7,
"file": "/tmp/twitter.log"
},
"server": {
"level": 7,
"file": "/tmp/wenotes-server.log"
}
......@@ -36,7 +42,7 @@
"RocketChat": {
"subscribe": "/WEnotes/*",
"channel": "#wenotes-all",
"webhook": "https://chat.oeru.org/hooks/[chat_wenotes-all]"
"webhook": "https://chat.oeru.org/hooks/ROCKETCHAT_WENOTES_HASH"
}
},
"IRC": {
......@@ -45,31 +51,56 @@
"ircchannel": "#wikieducator",
"RocketChat": {
"channel": "#wikieducator-irc",
"webhook": "https://chat.oeru.org/hooks/[chat_wikieducator-irc]"
"webhook": "https://chat.oeru.org/hooks/ROCKETCHAT_IRC_HASH"
}
},
"googleapikey": "[google-api-key]",
"googleapiserverkey": "[google-api-serverkey]",
"moodleuser": "jimtittsler",
"moodlepass": "mrexe",
"tags": ["wikieducator", "ocl4ed", "oeru", "wenotes", "ds4oer", "uowmun", "oeru16"],
"blacklist": ["asiangirl", "japanesa", "panties", "nipples", "stockings", "oppai", "tits", "bigtits", "japanav", "gangbang", "blowjob", "pantsu", "buenosaires", "escuelacuzque"],
"fayeurl": "http://localhost/faye",
"fayepass": "[faye_pass]",
"RocketChat": {
"token": "post4WEnotes",
"tag": "oeru",
"baseURL": "https://chat.oeru.org/"
},
"googleapikey": "GOOGLE_API_KEY",
"googleapiserverkey": "GOOGLE_API_SERVER_KEY",
"moodleuser": "MOODLE_USER",
"moodlepass": "MOODLE_PASSWORD",
"tags": ["wikieducator", "ocl4ed", "oeru", "wenotes", "ds4oer", "uowmun", "oeru17"],
"blacklist": ["asiangirl", "japanesa", "panties", "nipples", "stockings", "oppai", "tits", "bigtits", "japanav", "gangbang", "blowjob", "pantsu", "buenosaires", "escuelacuzque", "milf", "lingerie", "ass", "pussy"],
"fayeurl": "http://faye/faye",
"fayepass": "FAYE_PASSWORD",
"twitter": {
"consumer_key": "[twitter_consumer-key]",
"consumer_secret": "[twitter_consumer-secret]",
"access_token_key": "[twitter_accesstoken-key]",
"access_token_secret": "[twitter_accesstoken-secret]"
"consumer_key": "TWITTER_CONSUMER_KEY",
"consumer_secret": "TWITTER_CONSUMER_SECRET",
"access_token_key": "TWITTER_ACCESS_KEY",
"access_token_secret": "TWITTER_ACCESS_SECRET"
},
"feedsMoodle": "[]",
"gdata": {
"user": "bot@oerfoundation.org",
"pass": "[gdata]"
"user": "GPLUS_USER_EMAIL",
"pass": "GPLUS_USER_PASSWORD"
},
"communities": "[]",
"communities": [{"id":"110673383804329227095", "tag": "wikieducator"},
{ "id":"107652967421847253472", "tag": "sp4ed"},
{"id":"101164183090938345449", "tag": "ocl4ed"}
],
"discourse": "https://community.oeru.org",
"forums": {
"partner101": "https://forums.oeru.org/c/courses/partner101.json",
"ds4oer": "https://forums.oeru.org/c/courses/ds4oer.json",
"csf101": "https://forums.oeru.org/tags/csf101.json",
"csf102": "https://forums.oeru.org/tags/csf102.json",
"csf103": "https://forums.oeru.org/tags/csf103.json",
"csf104": "https://forums.oeru.org/tags/csf104.json",
"lida101": "https://forums.oeru.org/tags/lida101.json",
"lida102": "https://forums.oeru.org/tags/lida102.json",
"lida103": "https://forums.oeru.org/tags/lida103.json",
"lida104": "https://forums.oeru.org/tags/lida104.json"
},
"bookmarks": {
"url": "https://bookmarks.oeru.org",
},
"hypothesis": {
"url": "https://hypothes.is",
},
"medium": {
"url": "https://medium.com"
}
}
......@@ -55,8 +55,13 @@ fi
# set up Cron jobs...
echo "setting up cron jobs"
echo "# created by Docker and the OER Foundation" > $CRON
echo "4,24,44 * * * * root cd $WENOTES/tools/ && nice python gplus.py && nice python feeds.py && nice python groups.py" >> $CRON
echo "2,22,42 * * * * root cd $WENOTES/tools/ && nice python forums.py && nice python discourse.py --full " >> $CRON
echo "LOG=/opt/wenotes/cronttest" >> $CRON
echo "WEDIR=/opt/wenotes/tools" >> $CRON
echo "PY=/usr/bin/python"
echo '8,18,28,38,48,58 * * * * root cd $WEDIR && nice $PY bookmarks.py && nice $PY medium.py' >> $CRON
echo '6,16,26,36,46,56 * * * * root cd $WEDIR && nice $PY mastodon.py && nice $PY hypothesis.py' >> $CRON
echo '4,14,24,34,44,54 * * * * root cd $WEDIR && nice $PY gplus.py && nice $PY feeds.py && nice $PY groups.py' >> $CRON
echo '2,12,22,32,42,52 * * * * root cd $WEDIR && nice $PY forums.py && nice $PY discourse.py --full' >> $CRON
chmod 0644 $CRON
# next start various Javascript services
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment