Skip to content

Commit

Permalink
rename memoframe -> netcapsule
Browse files Browse the repository at this point in the history
move generic -> base-browser
use 'netcapsule/' dockerhub prefix
  • Loading branch information
ikreymer committed Sep 16, 2015
1 parent 8b047e5 commit f0d9109
Show file tree
Hide file tree
Showing 16 changed files with 26 additions and 23 deletions.
13 changes: 8 additions & 5 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
VNC_PORT = 6080
CMD_PORT = 6082
VERSION='1.18'
PYWB_HOST = 'memoframe_pywb_1'
REDIS_HOST = 'memoframe_redis_1'
PYWB_HOST = 'netcapsule_pywb_1'
REDIS_HOST = 'netcapsule_redis_1'

EXPIRE_TIME = 120
CHECK_TIME = 10
Expand Down Expand Up @@ -100,11 +100,14 @@ def server_static(filepath):
@jinja2_view('replay.html', template_lookup=['templates'])
def route_load_url(path='', url='', ts=''):
if path == 'ns' or path == 'netscape':
tag = 'memoframe/netscape'
tag = 'netcapsule/netscape'
elif path == 'mosaic':
tag = 'memoframe/mosaic'
tag = 'netcapsule/mosaic'
elif path == 'firefox':
tag = 'netcapsule/firefox'
else:
tag = 'memoframe/firefox'
tag = 'netcapsule/firefox'


vnc_port, cmd_port = dc.new_container(tag, {'URL': url, 'TS': ts})

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions browsers/generic/app.py → browsers/base-browser/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
import sys
import os

PYWB_HOST_PORT = 'memoframe_pywb_1:8080'
PYWB_HOST_PORT = 'netcapsule_pywb_1:8080'

REDIS_HOST = 'memoframe_redis_1'
REDIS_HOST = 'netcapsule_redis_1'

curr_ip = '127.0.0.1'
driver = None
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions browsers/build-browsers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )

set -e

docker build -t memoframe/base-browser $DIR/generic
docker build -t memoframe/netscape $DIR/netscape
docker build -t memoframe/firefox $DIR/firefox
docker build -t memoframe/mosaic $DIR/mosaic
docker build -t netcapsule/base-browser $DIR/generic
docker build -t netcapsule/netscape $DIR/netscape
docker build -t netcapsule/firefox $DIR/firefox
docker build -t netcapsule/mosaic $DIR/mosaic

2 changes: 1 addition & 1 deletion browsers/firefox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM memoframe/base-browser
FROM netcapsule/base-browser

ENV FF_VERSION 40.0.3

Expand Down
4 changes: 2 additions & 2 deletions browsers/firefox/ffprofile/user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
user_pref("network.proxy.http", "memoframe_pywb_1");
user_pref("network.proxy.http", "netcapsule_pywb_1");
user_pref("network.proxy.http_port", 8080);
user_pref("network.proxy.ssl", "memoframe_pywb_1");
user_pref("network.proxy.ssl", "netcapsule_pywb_1");
user_pref("network.proxy.ssl_port", 8080);
user_pref("network.proxy.type", 1);
user_pref("network.proxy.share_proxy_settings", true);
Expand Down
2 changes: 1 addition & 1 deletion browsers/firefox/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cd /home/browser/ffprofile
sudo chown browser:browser /home/browser/ffprofile/*
chmod 644 /home/browser/ffprofile/*

http_proxy="http://memoframe_pywb_1:8080" wget "http://pywb.proxy/pywb-ca.pem"
http_proxy="http://netcapsule_pywb_1:8080" wget "http://pywb.proxy/pywb-ca.pem"

certutil -A -n "PYWB" -t "TCu,Cuw,Tuw" -i ./pywb-ca.pem -d /home/browser/ffprofile

Expand Down
2 changes: 1 addition & 1 deletion browsers/mosaic/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM memoframe/base-browser
FROM netcapsule/base-browser

RUN apt-get update && apt-get install -y \
build-essential libmotif-dev libjpeg62-turbo-dev libpng12-dev x11proto-print-dev libxmu-headers libxpm-dev libxmu-dev \
Expand Down
2 changes: 1 addition & 1 deletion browsers/mosaic/proxy
Original file line number Diff line number Diff line change
@@ -1 +1 @@
http memoframe_pywb_1 8080 http
http netcapsule_pywb_1 8080 http
2 changes: 1 addition & 1 deletion browsers/netscape/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM memoframe/base-browser
FROM netcapsule/base-browser

RUN sudo dpkg --add-architecture i386
RUN apt-get update && apt-get install -y \
Expand Down
4 changes: 2 additions & 2 deletions browsers/netscape/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ user_pref("mail.thread.win_width", 0);
user_pref("mail.use_movemail", false);

user_pref("network.hosts.socks_serverport", 0);
user_pref("network.proxy.http", "memoframe_pywb_1");
user_pref("network.proxy.http", "netcapsule_pywb_1");
user_pref("network.proxy.http_port", 8080);
user_pref("network.proxy.ssl", "memoframe_pywb_1");
user_pref("network.proxy.ssl", "netcapsule_pywb_1");
user_pref("network.proxy.ssl_port", 8080);
user_pref("network.proxy.type", 1);

Expand Down
4 changes: 2 additions & 2 deletions browsers/netscape/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ mv /download/preferences.js ./preferences.js
sudo chown browser:browser ./preferences.js
chmod 644 ./preferences.js

PYWB_IP=$(grep memoframe_pywb_1 /etc/hosts | cut -f 1 | head -n 1)
PYWB_IP=$(grep netcapsule_pywb_1 /etc/hosts | cut -f 1 | head -n 1)

sed -i s/memoframe_pywb_1/$PYWB_IP/g ./preferences.js
sed -i s/netcapsule_pywb_1/$PYWB_IP/g ./preferences.js

awk -v URL="$URL" '{gsub("HOME_PAGE_URL", URL, $0); print}' ./preferences.js > /tmp/prefs.tmp && mv /tmp/prefs.tmp ./preferences.js

Expand Down
2 changes: 1 addition & 1 deletion pywb/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ urlrewriter_class: !!python/name:archivereplayview.ReUrlRewriter
enable_cdx_api: true
framed_replay: false

redis_url: redis://memoframe_redis_1:6379/0
redis_url: redis://netcapsule_redis_1:6379/0

enable_http_proxy: true

Expand Down

0 comments on commit f0d9109

Please sign in to comment.