Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add web-haproxy and web-nginx to docker-compose.production.yml #4566

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

version: "3.1"
services:
web:
ports:
- 8080:80
covers:
ports:
- 7075:7075
Expand Down
56 changes: 56 additions & 0 deletions docker-compose.production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,62 @@

version: "3.1"
services:
web_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
web_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"
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ services:
dockerfile: docker/Dockerfile.oldev
command: docker/ol-web-start.sh
ports:
- 8080:80
- 3000:3000
expose:
- 80
depends_on:
- db
- infobase
Expand Down