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 c7e126b commit cf08478
Show file tree
Hide file tree
Showing 2 changed files with 6 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
14 changes: 0 additions & 14 deletions scripts/install_openresty.sh

This file was deleted.

0 comments on commit cf08478

Please sign in to comment.