Skip to content
This repository was archived by the owner on Jul 3, 2024. It is now read-only.

Commit e5623d0

Browse files
authored
Merge pull request #4 from hathitrust/DEV-667-everything-else
DEV-667 - add mb + ls + prepare the way for debug=local
2 parents 9d67bd5 + 8240062 commit e5623d0

File tree

5 files changed

+68
-2
lines changed

5 files changed

+68
-2
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,12 @@ pt/
1717
sample-data/
1818
slip/
1919
ssd/
20+
ping/
21+
mb/
22+
ls/
23+
mdp-lib/
24+
plack-lib/
25+
slip-lib/
26+
mdp-web/
2027
logs/
2128
cache/

docker-compose.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,13 @@ services:
5151
- ./cache:/htapps/babel/cache
5252
- ./pt:/htapps/babel/pt
5353
- ./ssd:/htapps/babel/ssd
54+
- ./ping:/htapps/babel/ping
55+
- ./mb:/htapps/babel/mb
56+
- ./ls:/htapps/babel/ls
5457
- ./common:/htapps/babel/common
58+
- ./mdp-lib:/htapps/babel/mdp-lib
59+
- ./slip-lib:/htapps/babel/slip-lib
60+
- ./plack-lib:/htapps/babel/plack-lib
5561
- "./sample-data/sdr1:/sdr1"
5662
- "./sample-data/etc:/htapps/babel/etc"
5763
- "./sample-data/watermarks:/htapps/babel/watermarks"
@@ -98,6 +104,7 @@ services:
98104
volumes:
99105
- ./slip/etc/sql/100_slip.sql:/docker-entrypoint-initdb.d/100_slip.sql
100106
- ./catalog/docker/vufind.sql:/docker-entrypoint-initdb.d/101_vufind.sql
107+
- ./mb/etc/sql/999_mb.sql:/docker-entrypoint-initdb.d/999_mb.sql
101108
ports:
102109
- "3307:3306"
103110

docker/babel-base/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,11 @@ RUN cpanm --notest \
5151
URI::Escape \
5252
CGI::PSGI \
5353
IP::Geolocation::MMDB \
54-
UUID
55-
54+
UUID \
55+
UUID::Tiny \
56+
YAML::Any \
57+
Data::Page
58+
5659
WORKDIR /htapps/babel/geoip
5760
ADD --chmod=644 https://github.com/maxmind/MaxMind-DB/blob/main/test-data/GeoIP2-Country-Test.mmdb?raw=true GeoIP2-Country.mmdb
5861

docker/nginx-default.conf

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,15 @@ server {
8787

8888
location /cgi/imgsrv {
8989
# rewrite /cgi/pt/(.*)$ /cgi/pt/$1 break;
90+
proxy_set_header Host $host;
91+
proxy_set_header X-Forwarded-For $remote_addr;
9092
proxy_pass http://apache-cgi:41028/cgi/imgsrv;
9193
}
9294

9395
location /cgi/pt {
9496
# rewrite /cgi/pt/(.*)$ /cgi/pt/$1 break;
97+
proxy_set_header Host $host;
98+
proxy_set_header X-Forwarded-For $remote_addr;
9599
proxy_pass http://apache-cgi:41028/cgi/pt;
96100
}
97101

@@ -102,6 +106,8 @@ server {
102106

103107
location /cgi/ssd {
104108
# rewrite /cgi/pt/(.*)$ /cgi/pt/$1 break;
109+
proxy_set_header Host $host;
110+
proxy_set_header X-Forwarded-For $remote_addr;
105111
proxy_pass http://apache-cgi:41028/cgi/ssd;
106112
}
107113

@@ -110,6 +116,42 @@ server {
110116
proxy_pass http://apache-cgi:41028/ssd;
111117
}
112118

119+
location /cgi/ping {
120+
# rewrite /cgi/pt/(.*)$ /cgi/pt/$1 break;
121+
proxy_set_header Host $host;
122+
proxy_set_header X-Forwarded-For $remote_addr;
123+
proxy_pass http://apache-cgi:41028/cgi/ping;
124+
}
125+
126+
# location /ping {
127+
# rewrite /ping/(.*)$ /ping/$1 break;
128+
# proxy_pass http://apache-cgi:41028/ping;
129+
# }
130+
131+
location /cgi/mb {
132+
# rewrite /cgi/pt/(.*)$ /cgi/pt/$1 break;
133+
proxy_set_header Host $host;
134+
proxy_set_header X-Forwarded-For $remote_addr;
135+
proxy_pass http://apache-cgi:41028/cgi/mb;
136+
}
137+
138+
location /mb {
139+
rewrite /mb/(.*)$ /mb/$1 break;
140+
proxy_pass http://apache-cgi:41028/mb;
141+
}
142+
143+
location /cgi/ls {
144+
# rewrite /cgi/pt/(.*)$ /cgi/pt/$1 break;
145+
proxy_set_header Host $host;
146+
proxy_set_header X-Forwarded-For $remote_addr;
147+
proxy_pass http://apache-cgi:41028/cgi/ls;
148+
}
149+
150+
location /ls {
151+
rewrite /ls/(.*)$ /ls/$1 break;
152+
proxy_pass http://apache-cgi:41028/ls;
153+
}
154+
113155
location / {
114156
try_files $uri @rewrite;
115157
}

setup.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,17 @@ git clone --recurse-submodules $GIT_BASE/imgsrv-sample-data ./sample-data
2323
git clone --recurse-submodules $GIT_BASE/catalog
2424
git clone --recurse-submodules $GIT_BASE/common
2525
git clone --recurse-submodules $GIT_BASE/pt
26+
git clone --recurse-submodules $GIT_BASE/mb
27+
git clone --recurse-submodules $GIT_BASE/ls
28+
git clone --recurse-submodules $GIT_BASE/ping
2629
git clone --recurse-submodules $GIT_BASE/ssd
2730
git clone --recurse-submodules $GIT_BASE/hathitrust_catalog_indexer
2831
git clone --recurse-submodules $GIT_BASE/slip
2932
git clone --recurse-submodules $GIT_BASE/lss_solr_configs
33+
git clone --recurse-submodules $GIT_BASE/mdp-lib
34+
git clone --recurse-submodules $GIT_BASE/plack-lib
35+
git clone --recurse-submodules $GIT_BASE/slip-lib
36+
git clone --recurse-submodules $GIT_BASE/mdp-web
3037

3138
echo "CURRENT_USER=$(id -u):$(id -g)" >> .env
3239
echo "APACHE_RUN_USER=$(id -u)" >> .env

0 commit comments

Comments
 (0)