-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve + Fix Bandersnatch Docker Compose Setup: Volume Configuration…
… + HTTPS Support (#1653) * Update nginx service configuration in docker-compose.yml This commit updates the bandersnatch_nginx service in the docker-compose.yml file. Changes include: 1. Specifying the correct build context and Dockerfile path for the Nginx image. The build context has been updated to point to the '../banderx' directory, which contains the Dockerfile and nginx.conf as per the structure. (since docker-compose doesn't handle links well in some versions) 2. Mounting the correct nginx.conf file. Previously, the nginx.conf file was assumed to be in the current directory. This update mounts the nginx.conf from '../banderx', following the instructions in '../banderx/README.md', ensuring that the Nginx server uses the appropriate configuration file for serving the mirrored data. 3. Updated comment has been updated to more accurately describe its purpose - serving the downloaded repository. * Adding https support for docker-compose Added commented lines for uncomment when HTTPS is wanted * Add optional HTTPS support to nginx.conf This commit introduces optional HTTPS support in the nginx.conf file. The changes are as follows: 1. Add of a new server block for handling HTTPS (port 443). This block is commented out by default and can be enabled by uncommenting the lines. It includes settings for SSL certificates and keys, which are expected to be mounted into the container at specified paths. 2. Additional server block for redirecting HTTP to HTTPS, also commented out by default. When enabled, this block will redirect all HTTP traffic to HTTPS, enhancing security. 3. The existing HTTP server block (port 80) remains unchanged and will continue to function as the default server. This is to allow users to easily enable HTTPS by uncommenting the relevant sections and ensuring that the SSL certificates and keys are correctly mounted into the Nginx container. * Update README with HTTPS setup instructions This commit updates the README in the bandersnatch_docker_compose directory to include detailed instructions for enabling HTTPS support. The key additions are: 1. Steps to uncomment relevant sections in the `docker-compose.yml` for mounting SSL certificate and key files, and exposing the HTTPS port 44300. 2. Steps for placing SSL certificate and key files in `banderx` directory. 3. Guide on uncommenting the HTTPS server block in the `nginx.conf` file to enable SSL support and optional HTTP to HTTPS redirection. 4. Steps to rebuild and restart the Docker containers after making these changes. 5. Simple methods to test the HTTPS connection using a web or the `curl`. * Added table of contents * Add PR #1653 to CHANGES.md * committing pre-commit fixes * Update docker-compose.yml * Fix bandersnatch command in docker-compose file * Add guide for generating SSL certificate for HTTPS support * Update README.md * Fix parameter suggested by pre-commit * pre-commit README.md fix * Added fixes done by pre-commit * Fix Table of Contents * Added pre-commit fixes * added pre-commit fixes * pre-commit fixes * "Added a function to convert paths to Windows compatible format * pre-commit fix * Revert "pre-commit fix" This reverts commit c01977b. * Revert ""Added a function to convert paths to Windows compatible format" This reverts commit 79b73bd. * excluded 'bandersnatch_docker_compose' from test discovery * pre-commit fix * Update src/bandersnatch_docker_compose/README.md added -v, --verbose - to make curl verbose during the operation. Useful for debugging and seeing what's going on "under the hood". A line starting with '>' means "header data" sent by curl, '<' means "header data" received by curl that is hidden in normal cases, and a line starting with '*' means additional info provided by curl. Co-authored-by: Cooper Lees <[email protected]> * removed .* from norecursedirs * Update CHANGES.md Move change entry to Unreleased --------- Co-authored-by: Cooper Lees <[email protected]>
- Loading branch information
1 parent
0b9e3a7
commit 51478f0
Showing
8 changed files
with
202 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
log_cli_level = DEBUG | ||
log_level = DEBUG | ||
asyncio_mode=strict | ||
norecursedirs = src/bandersnatch_docker_compose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
../banderx/Dockerfile | ||
../banderx/Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
../banderx/nginx.conf | ||
../banderx/nginx.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters