From 1fd368445cc4d14d2b8e9964ac2a72e94197bb05 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Thu, 4 Mar 2021 04:59:12 +0000 Subject: [PATCH] Cleanup --- Dockerfile.backend | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/Dockerfile.backend b/Dockerfile.backend index 6e84ef8..0c560a7 100644 --- a/Dockerfile.backend +++ b/Dockerfile.backend @@ -15,7 +15,6 @@ USER archivebot RUN git clone https://github.com/ArchiveTeam/ArchiveBot.git /home/archivebot/ArchiveBot \ && cd /home/archivebot/ArchiveBot \ && rm Gemfile.lock \ -# && sed -i "s/analysand\.git'$/analysand.git', ref: '4aa0f03426930440fde6a6878269b9bcf6762a50'/" Gemfile \ && sed -i "s|, '~> 3\.0\.2'||; s/gem 'webmachine', .*$/gem 'webmachine', '~> 1.2.2'/; s/gem 'reel'/gem 'reel', '~> 0.4.0'/" Gemfile \ && GEM_HOME=/home/archivebot/.gems bundle install \ && cd /home/archivebot/ArchiveBot/plumbing \ @@ -32,12 +31,10 @@ RUN echo '#!/bin/bash' >/home/archivebot/launch.sh \ && echo 'export GEM_HOME=/home/archivebot/.gems' >>/home/archivebot/launch2.sh \ && echo 'echo "Starting Redis"' >>/home/archivebot/launch2.sh \ && echo '(cd /home/archivebot/redis && redis-server redis.conf) &' >>/home/archivebot/launch2.sh \ -# && echo '(cd /home/archivebot/ArchiveBot/bot && bundle exec ruby bot.rb -s "ircs://irc.hackint.org:6697" -r "redis://127.0.0.1:6379/0" -c "#notarchivebot" -n Puppeteer --db-credentials admin:areallygoodpassword) &' >>/home/archivebot/launch2.sh \ && echo '(cd /home/archivebot/ArchiveBot/bot && bundle exec ruby bot.rb -s "ircs://irc.hackint.org:6697" -r "redis://127.0.0.1:6379/0" -c "#notarchivebot" -n Puppeteer) &' >>/home/archivebot/launch2.sh \ && echo '(cd /home/archivebot/ArchiveBot && export REDIS_URL=redis://127.0.0.1:6379/0 UPDATES_CHANNEL=updates FIREHOSE_SOCKET_URL=tcp://127.0.0.1:12345 && plumbing/updates-listener | plumbing/log-firehose) &' >>/home/archivebot/launch2.sh \ && echo '(cd /home/archivebot/ArchiveBot && bundle exec ruby dashboard/app.rb -u http://0.0.0.0:4567) &' >>/home/archivebot/launch2.sh \ && echo '(cd /home/archivebot/ArchiveBot && FIREHOSE_SOCKET_URL=tcp://127.0.0.1:12345 plumbing/firehose-client | python3 dashboard/websocket.py) &' >>/home/archivebot/launch2.sh \ -# && echo '(cd /home/archivebot/ArchiveBot/cogs && bundle exec ruby start.rb --db-credentials admin:areallygoodpassword) &' >>/home/archivebot/launch2.sh \ && echo '(cd /home/archivebot/ArchiveBot/cogs && bundle exec ruby start.rb) &' >>/home/archivebot/launch2.sh \ && echo '(cd /home/archivebot/ArchiveBot/plumbing && REDIS_URL=redis://127.0.0.1:6379/0 UPDATES_CHANNEL=updates ./analyzer) &' >>/home/archivebot/launch2.sh \ && echo '(cd /home/archivebot/ArchiveBot/plumbing && REDIS_URL=redis://127.0.0.1:6379/0 UPDATES_CHANNEL=updates ./trimmer >/dev/null) &' >>/home/archivebot/launch2.sh \ @@ -48,23 +45,15 @@ RUN echo '#!/bin/bash' >/home/archivebot/launch.sh \ USER root RUN \ # Set up CouchDB -# echo 'admin = areallygoodpassword' >>/opt/couchdb/etc/local.ini \ - /etc/init.d/couchdb start \ + /etc/init.d/couchdb start \ && sleep 5 \ && cat /opt/couchdb/var/log/couchdb.log \ -# && curl -sf http://admin:areallygoodpassword@127.0.0.1:5984/ \ -# && curl -sf -X PUT http://admin:areallygoodpassword@127.0.0.1:5984/_users \ -# && curl -sf -X PUT http://admin:areallygoodpassword@127.0.0.1:5984/_replicator \ -# && curl -sf -X PUT http://admin:areallygoodpassword@127.0.0.1:5984/archivebot \ -# && grep -v _rev /home/archivebot/ArchiveBot/db/design_docs/ignore_patterns.json | curl -sf -X PUT --data @- http://admin:areallygoodpassword@127.0.0.1:5984/archivebot/_design/ignore_patterns \ -# && grep -v _rev /home/archivebot/ArchiveBot/db/design_docs/user_agents.json | curl -sf -X PUT --data @- http://admin:areallygoodpassword@127.0.0.1:5984/archivebot/_design/user_agents && curl -sf http://127.0.0.1:5984/ \ && curl -sf -X PUT http://127.0.0.1:5984/_users \ && curl -sf -X PUT http://127.0.0.1:5984/_replicator \ && curl -sf -X PUT http://127.0.0.1:5984/archivebot \ && grep -v _rev /home/archivebot/ArchiveBot/db/design_docs/ignore_patterns.json | curl -sf -X PUT --data @- http://127.0.0.1:5984/archivebot/_design/ignore_patterns \ && grep -v _rev /home/archivebot/ArchiveBot/db/design_docs/user_agents.json | curl -sf -X PUT --data @- http://127.0.0.1:5984/archivebot/_design/user_agents -RUN sed -i "s~\( start_listener\)~ Dir.foreach(@path) do |filename|\n next if filename == '.' or filename == '..'\n next if not filename.end_with? '.json'\n add_set("'"#{@path}/#{filename}"'")\n end\n\1~" /home/archivebot/ArchiveBot/cogs/couchdb_doc_updater.rb EXPOSE 4567 EXPOSE 4568 ENTRYPOINT ["/home/archivebot/launch.sh"]