Skip to content

Commit

Permalink
moving nginx to olbase
Browse files Browse the repository at this point in the history
  • Loading branch information
mekarpeles authored and ol-dev1.us.archive.org root committed May 12, 2021
1 parent 3857e79 commit f4981ef
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 25 deletions.
15 changes: 6 additions & 9 deletions docker-compose.production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ services:

covers_nginx:
profiles: ["ol-covers0"]
build:
context: .
dockerfile: docker/Dockerfile.nginx
image: "${OLIMAGE:-openlibrary/olbase:latest}"
command: nginx -g daemon off
restart: always
depends_on:
- covers
Expand Down Expand Up @@ -117,9 +116,8 @@ services:
web_nginx:
restart: always
hostname: "$HOSTNAME"
build:
context: .
dockerfile: docker/Dockerfile.nginx
image: "${OLIMAGE:-openlibrary/olbase:latest}"
command: nginx -g daemon off
volumes:
- ./docker/nginx.conf:/etc/nginx/nginx.conf:ro
- ../olsystem/etc/nginx/sites-available/default-docker.conf:/etc/nginx/sites-enabled/default:ro
Expand All @@ -142,9 +140,8 @@ services:

infobase_nginx:
profiles: ["ol-home0"]
build:
context: .
dockerfile: docker/Dockerfile.nginx
image: "${OLIMAGE:-openlibrary/olbase:latest}"
command: nginx -g daemon off
restart: always
depends_on:
- infobase
Expand Down
16 changes: 0 additions & 16 deletions docker/Dockerfile.nginx

This file was deleted.

13 changes: 13 additions & 0 deletions docker/Dockerfile.olbase
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,19 @@ RUN apt-get -qq update && apt-get install -y build-essential libssl-dev zlib1g-d
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git

# Install Archive.org nginx w/ IP anonymization
USER root
RUN apt-get update && apt-get install -y --no-install-recommends nginx curl \
# nginx-plus
apt-transport-https lsb-release ca-certificates wget
RUN wget -O - https://openresty.org/package/pubkey.gpg | apt-key add -
RUN echo "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main" \
| tee /etc/apt/sources.list.d/openresty.list
RUN apt-get update && apt-get -y install --no-install-recommends openresty
RUN rm /usr/sbin/nginx
RUN curl -L https://archive.org/download/nginx/nginx -o /usr/sbin/nginx
RUN chmod +x /usr/sbin/nginx

# Install latest pyenv (https://github.com/pyenv/pyenv-installer)
USER openlibrary
RUN curl https://pyenv.run | bash && \
Expand Down

0 comments on commit f4981ef

Please sign in to comment.