Skip to content

Comments

remove port 8000 from docker-compose as unnecessary for web container#3541

Merged
hughrun merged 3 commits intobookwyrm-social:mainfrom
ilkka-ollakka:fix/remove_unneeded_port_from_docker_compose
Apr 27, 2025
Merged

remove port 8000 from docker-compose as unnecessary for web container#3541
hughrun merged 3 commits intobookwyrm-social:mainfrom
ilkka-ollakka:fix/remove_unneeded_port_from_docker_compose

Conversation

@ilkka-ollakka
Copy link
Contributor

Description

Nginx container doesn't need it to be able to connect to web container, so it just unnecessarily opens the port to outside connections

  • Related Issue #
  • Closes #

What type of Pull Request is this?

  • Bug Fix
  • Enhancement
  • Plumbing / Internals / Dependencies
  • Refactor

Does this PR change settings or dependencies, or break something?

  • This PR changes or adds default settings, configuration, or .env values
  • This PR changes or adds dependencies
  • This PR introduces other breaking changes

Details of breaking or configuration changes (if any of above checked)

Documentation

  • New or amended documentation will be required if this PR is merged
  • I have created a matching pull request in the Documentation repository
  • I intend to create a matching pull request in the Documentation repository after this PR is merged

Tests

  • My changes do not need new tests
  • All tests I have added are passing
  • I have written tests but need help to make them pass
  • I have not written tests and need help to write them

nginx doesn't need it to be able to connect to web container, so it just unnecessarily opens the port to outside connections
@ilkka-ollakka
Copy link
Contributor Author

Seems that bw-dev command contains portion to show in which that port is mapped, so it seems to have some use in some cases?

@hughrun
Copy link
Member

hughrun commented Apr 12, 2025

I think maybe we need 8000 open to use the Django development server? As things are currently set up, main is for development and production is for live production servers.

@ilkka-ollakka
Copy link
Contributor Author

The port needs to be opened only if you want to access that development server directly without going via ngixn container. Access via nginx container works in all modes (reverse-proxy, production https and development) fine without it.

Seems that it might be there for some historical reason as it has been there since the start of the docker-compose-file, and is not needed anymore?

@ilkka-ollakka
Copy link
Contributor Author

I'm not sure if there is some use case (debug etc) that needs direct connect to django run development server?

@hughrun
Copy link
Member

hughrun commented Apr 27, 2025

Ok now I see what you mean and have tested this successfully. I can't see any reason we need to directly access 8000.

@hughrun hughrun merged commit 0cc5106 into bookwyrm-social:main Apr 27, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants