From 54e75ac9ceccbe001096e99204ee428cd7491461 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 10 Feb 2021 15:10:20 +0100 Subject: [PATCH 1/6] Add www-haproxy and www-nginx to docker-compose.production.yml --- docker-compose.production.yml | 56 +++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/docker-compose.production.yml b/docker-compose.production.yml index d83b29a187b..ad7f3579684 100644 --- a/docker-compose.production.yml +++ b/docker-compose.production.yml @@ -7,6 +7,62 @@ version: "3.1" services: + www_haproxy: + image: haproxy:2.3.5 + restart: always + #depends_on: + # - www_haproxy + volumes: + #- olsystem ... /etc/haproxy/haproxy.cfg + #- ./docker/nginx.conf:/etc/nginx/nginx.conf:ro + #- ./docker/covers_nginx.conf:/etc/nginx/sites-enabled/covers_nginx.conf:ro + # Needed for HTTPS, since this is a public server + - ../olsystem/etc/haproxy/haproxy.cfg:/etc/haproxy/haproxy.cfg:ro + # Needs access to openlibrary for static files + #- ../olsystem:/olsystem + #- /1/var/lib/openlibrary/sitemaps/sitemaps:/sitemaps + ports: + - 80:80 + - 443:443 + networks: + - webnet + logging: + options: + max-size: "512m" + max-file: "4" + secrets: + - petabox_seed + # Needed by default-docker.conf + - ssl_certificate + - ssl_certificate_key + www_nginx: + image: nginx:1.19.4 + restart: always + depends_on: + - www_haproxy + volumes: + - ./docker/nginx.conf:/etc/nginx/nginx.conf:ro + - ./docker/covers_nginx.conf:/etc/nginx/sites-enabled/covers_nginx.conf:ro + # Needed for HTTPS, since this is a public server + - ../olsystem/etc/nginx/sites-available/default-docker.conf:/etc/nginx/sites-enabled/default:ro + # Needs access to openlibrary for static files + - ../olsystem:/olsystem + - /1/var/lib/openlibrary/sitemaps/sitemaps:/sitemaps + ports: + - 80:80 + - 443:443 + networks: + - webnet + logging: + options: + max-size: "512m" + max-file: "4" + secrets: + - petabox_seed + # Needed by default-docker.conf + - ssl_certificate + - ssl_certificate_key + web: restart: always hostname: "$HOSTNAME" From e38b1e194d56505443fe1a2ff2125f5d0aa1ccec Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Thu, 11 Feb 2021 18:43:57 +0100 Subject: [PATCH 2/6] Use web, not www --- docker-compose.production.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.production.yml b/docker-compose.production.yml index ad7f3579684..ec4ab637f66 100644 --- a/docker-compose.production.yml +++ b/docker-compose.production.yml @@ -7,7 +7,7 @@ version: "3.1" services: - www_haproxy: + web_haproxy: image: haproxy:2.3.5 restart: always #depends_on: @@ -35,7 +35,7 @@ services: # Needed by default-docker.conf - ssl_certificate - ssl_certificate_key - www_nginx: + web_nginx: image: nginx:1.19.4 restart: always depends_on: From d154732f7835e3454eb7940e162b24fd22e8073e Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Thu, 11 Feb 2021 18:46:50 +0100 Subject: [PATCH 3/6] Test the web ports vs. expose --- docker-compose.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index ac4d162c49c..80119f1754e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,8 +11,9 @@ services: dockerfile: docker/Dockerfile.oldev command: docker/ol-web-start.sh ports: - - 8080:80 - 3000:3000 + expose: + - 8080:80 depends_on: - db - infobase From 19af9eeea538114278d9806562040103f426dcaf Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Thu, 11 Feb 2021 18:55:45 +0100 Subject: [PATCH 4/6] Set web ports --- docker-compose.override.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker-compose.override.yml b/docker-compose.override.yml index fb361fcfcee..47e33ef8069 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -4,6 +4,9 @@ version: "3.1" services: + web: + ports: + - 8080:80 covers: ports: - 7075:7075 From 0f70275ea9167a12f4e880315a04f811de53a653 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Thu, 11 Feb 2021 21:57:28 +0100 Subject: [PATCH 5/6] Add web ports --- docker-compose.staging.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.staging.yml b/docker-compose.staging.yml index bb5e8a7ad7b..dabb6cfb599 100644 --- a/docker-compose.staging.yml +++ b/docker-compose.staging.yml @@ -10,6 +10,8 @@ services: web: restart: always hostname: "$HOSTNAME" + ports: + - 8080:80 environment: - GUNICORN_OPTS= --workers 4 --timeout 180 - OL_CONFIG=/olsystem/etc/openlibrary.yml From cd600b313fb0add11602000ba08f4398b038afd3 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 22 Feb 2021 17:10:56 +0100 Subject: [PATCH 6/6] Expose: 80 (or should it be 8080?!?) --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 80119f1754e..4c2c86a30ec 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,7 +13,7 @@ services: ports: - 3000:3000 expose: - - 8080:80 + - 80 depends_on: - db - infobase