File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,6 @@ services:
30
30
- .env
31
31
# volumes:
32
32
# - solrdata:/var/solr:rw
33
- ports :
34
- - " 8983:8983"
35
33
networks :
36
34
- tec-net
37
35
command :
Original file line number Diff line number Diff line change @@ -12,9 +12,12 @@ RUN adduser -D -s /bin/false -G www-data www-data
12
12
RUN mkdir -p /data/nginx/cache
13
13
14
14
RUN apk update \
15
- && apk add --no-cache openssl \
15
+ && apk add --no-cache openssl apache2-utils \
16
16
&& mkdir -p /tls/encryptioncompendium.org/
17
17
18
+ # Create an empty .htpasswd file for authentication
19
+ RUN touch /etc/nginx/.htpasswd
20
+
18
21
# Add a custom run script
19
22
COPY run.sh /run.sh
20
23
CMD [ "/run.sh" ]
Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ upstream encryption_compendium_server {
3
3
server tec-gunicorn:5000;
4
4
}
5
5
6
+ upstream solr {
7
+ server tec-search:8983;
8
+ }
9
+
6
10
limit_req_zone $binary_remote_addr zone=mylimit:10m rate=60r/m;
7
11
8
12
server {
@@ -27,6 +31,16 @@ server {
27
31
proxy_redirect off;
28
32
}
29
33
34
+ location /solr/ {
35
+ proxy_pass http://solr;
36
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
37
+ proxy_set_header Host $host;
38
+ proxy_redirect off;
39
+
40
+ auth_basic "Restricted Content";
41
+ auth_basic_user_file /etc/nginx/.htpasswd;
42
+ }
43
+
30
44
location /static/ {
31
45
# Serve static files from Nginx since it's _significantly_ more performant
32
46
# than having Gunicorn serve those files.
You can’t perform that action at this time.
0 commit comments