Skip to content

Commit 43b782b

Browse files
committed
Use newer version of NJS
1 parent ef8abc4 commit 43b782b

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

docker/Dockerfile.olbase

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,8 @@ RUN ./install_nodejs.sh && rm ./install_nodejs.sh
4040

4141
# Install nginx
4242
USER root
43-
RUN apt-get update && apt-get install -y --no-install-recommends nginx curl letsencrypt \
44-
# log rotation service for ol-nginx
45-
logrotate \
46-
# rsync service for pulling monthly sitemaps from ol-home0 to ol-www0
47-
rsync \
48-
# NJS for IP anonymization
49-
libnginx-mod-http-js \
50-
# Remove the stock nginx config file
51-
&& rm /etc/nginx/sites-enabled/default
43+
COPY scripts/install_nginx.sh ./
44+
RUN ./install_nginx.sh && rm ./install_nginx.sh
5245

5346
RUN mkdir -p /var/log/openlibrary /var/lib/openlibrary && chown openlibrary:openlibrary /var/log/openlibrary /var/lib/openlibrary \
5447
&& mkdir /openlibrary && chown openlibrary:openlibrary /openlibrary \

scripts/install_nginx.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#! /bin/bash
2+
3+
apt-get update
4+
5+
# log rotation service for ol-nginx
6+
# rsync service for pulling monthly sitemaps from ol-home0 to ol-www0
7+
apt-get install -y --no-install-recommends curl \
8+
logrotate \
9+
rsync \
10+
lsb-release
11+
12+
# Add the NGINX signing key + Repo
13+
curl -fsSL https://nginx.org/keys/nginx_signing.key | tee /usr/share/keyrings/nginx-keyring.asc
14+
echo "deb [signed-by=/usr/share/keyrings/nginx-keyring.asc] http://nginx.org/packages/debian $(lsb_release -cs) nginx" \
15+
> /etc/apt/sources.list.d/nginx.list
16+
17+
# Install nginx and the NJS module
18+
apt-get update
19+
apt-get install -y --no-install-recommends nginx nginx-module-njs letsencrypt

0 commit comments

Comments
 (0)