Skip to content

Commit

Permalink
dockerfile + compose for ol-www0 web_nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
mekarpeles committed Mar 4, 2021
1 parent 949fc58 commit 602acf8
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docker-compose.production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,31 @@ services:
- ../olsystem:/olsystem
- infobase-writelog:/1/var/lib/openlibrary/infobase/log
- infobase-errorlog:/1/var/log/openlibrary/infobase-errors
web_nginx:
restart: always
hostname: "$HOSTNAME"
build:
context: .
dockerfile: docker/Dockerfile.nginx
volumes:
- ./docker/nginx.conf:/etc/nginx/nginx.conf:ro
- ../olsystem:/olsystem
- ../olsystem/etc/nginx/sites-available/default-docker.conf:/etc/nginx/sites-enabled/default:ro
- ../olsystem/etc/nginx/sites-available/openlibrary.conf:/etc/nginx/sites-available/openlibrary.conf:ro
ports:
- 80:80
- 443:443
networks:
- webnet
logging:
options:
max-size: "512m"
max-file: "4"
secrets:
- petabox_seed
- ssl_certificate
- ssl_certificate_key

infobase_nginx:
image: nginx:1.19.4
restart: always
Expand Down
15 changes: 15 additions & 0 deletions docker/Dockerfile.nginx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM ubuntu:xenial

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

0 comments on commit 602acf8

Please sign in to comment.