Skip to content

Commit

Permalink
Switch to stock nginx with NJS support
Browse files Browse the repository at this point in the history
  • Loading branch information
cdrini committed Dec 16, 2024
1 parent a359637 commit 5b301dd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 25 deletions.
17 changes: 6 additions & 11 deletions docker/Dockerfile.olbase
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,17 @@ RUN apt-get -qq update && apt-get install -y \
COPY scripts/install_nodejs.sh ./
RUN ./install_nodejs.sh && rm ./install_nodejs.sh

# Install Archive.org nginx w/ IP anonymization
# Install nginx
USER root
RUN apt-get update && apt-get install -y --no-install-recommends nginx curl letsencrypt \
# nginx-plus
apt-transport-https lsb-release ca-certificates wget \
# log rotation service for ol-nginx
logrotate \
# rsync service for pulling monthly sitemaps from ol-home0 to ol-www0
rsync
COPY scripts/install_openresty.sh ./
RUN ./install_openresty.sh && rm ./install_openresty.sh
RUN rm /usr/sbin/nginx
RUN curl -L https://archive.org/download/nginx/nginx -o /usr/sbin/nginx
RUN chmod +x /usr/sbin/nginx
# Remove the stock nginx config file
RUN rm /etc/nginx/sites-enabled/default
rsync \
# NJS for IP anonymization
libnginx-mod-http-js \
# Remove the stock nginx config file
&& rm /etc/nginx/sites-enabled/default

RUN mkdir -p /var/log/openlibrary /var/lib/openlibrary && chown openlibrary:openlibrary /var/log/openlibrary /var/lib/openlibrary \
&& mkdir /openlibrary && chown openlibrary:openlibrary /openlibrary \
Expand Down
3 changes: 3 additions & 0 deletions docker/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Needed for IP anonymization
load_module modules/ngx_http_js_module.so;

user www-data;

# XXX-Anand: Oct 2013
Expand Down
14 changes: 0 additions & 14 deletions scripts/install_openresty.sh

This file was deleted.

0 comments on commit 5b301dd

Please sign in to comment.