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

Updated docker internal port to 3000 #1626

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

jdetter
Copy link
Collaborator

@jdetter jdetter commented Aug 23, 2024

Description of Changes

Please describe your change, mention any related tickets, and so on here.

I have updated the port used by the docker-compose file to 3000 I have updated the default port for spacetimedb-standalone to be 3000. Originally we were using port 80 internally and then in the docker-compose file (and in other places) we were mapping 3000 => 80. This works fine but it was very confusing that you would get this start-up message:

...
node-1  | │  .d8888b.                                     888    d8b                        8888888b.  888888b.   │
node-1  | │ d88P  Y88b                                    888    Y8P                        888  "Y88b 888  "88b  │
node-1  | │ Y88b.                                         888                               888    888 888  .88P  │
node-1  | │  "Y888b.   88888b.   8888b.   .d8888b .d88b.  888888 888 88888b.d88b.   .d88b.  888    888 8888888K.  │
node-1  | │     "Y88b. 888 "88b     "88b d88P"   d8P  Y8b 888    888 888 "888 "88b d8P  Y8b 888    888 888  "Y88b │
node-1  | │       "888 888  888 .d888888 888     88888888 888    888 888  888  888 88888888 888    888 888    888 │
node-1  | │ Y88b  d88P 888 d88P 888  888 Y88b.   Y8b.     Y88b.  888 888  888  888 Y8b.     888  .d88P 888   d88P │
node-1  | │  "Y8888P"  88888P"  "Y888888  "Y8888P "Y8888   "Y888 888 888  888  888  "Y8888  8888888P"  8888888P"  │
node-1  | │            888                                                                                        │
node-1  | │            888                                                                                        │
node-1  | │            888                                                                                        │
node-1  | │                                  "Multiplayer at the speed of light"                                  │
node-1  | └───────────────────────────────────────────────────────────────────────────────────────────────────────┘
node-1  |
node-1  | spacetimedb version: 0.12.0
node-1  | spacetimedb path: /usr/src/app/target/debug/spacetimedb
node-1  | 2024-08-23T03:07:40.392627Z DEBUG crates/standalone/src/subcommands/start.rs:222: Starting SpacetimeDB listening on 0.0.0.0:80

This PR rectifies the problem and now you get the following start-up message:

...
node-1  | │  .d8888b.                                     888    d8b                        8888888b.  888888b.   │
node-1  | │ d88P  Y88b                                    888    Y8P                        888  "Y88b 888  "88b  │
node-1  | │ Y88b.                                         888                               888    888 888  .88P  │
node-1  | │  "Y888b.   88888b.   8888b.   .d8888b .d88b.  888888 888 88888b.d88b.   .d88b.  888    888 8888888K.  │
node-1  | │     "Y88b. 888 "88b     "88b d88P"   d8P  Y8b 888    888 888 "888 "88b d8P  Y8b 888    888 888  "Y88b │
node-1  | │       "888 888  888 .d888888 888     88888888 888    888 888  888  888 88888888 888    888 888    888 │
node-1  | │ Y88b  d88P 888 d88P 888  888 Y88b.   Y8b.     Y88b.  888 888  888  888 Y8b.     888  .d88P 888   d88P │
node-1  | │  "Y8888P"  88888P"  "Y888888  "Y8888P "Y8888   "Y888 888 888  888  888  "Y8888  8888888P"  8888888P"  │
node-1  | │            888                                                                                        │
node-1  | │            888                                                                                        │
node-1  | │            888                                                                                        │
node-1  | │                                  "Multiplayer at the speed of light"                                  │
node-1  | └───────────────────────────────────────────────────────────────────────────────────────────────────────┘
node-1  |
node-1  | spacetimedb version: 0.12.0
node-1  | spacetimedb path: /usr/src/app/target/debug/spacetimedb
node-1  | 2024-08-23T03:16:58.734561Z DEBUG crates/standalone/src/subcommands/start.rs:222: Starting SpacetimeDB listening on 0.0.0.0:3000

scroll to the right to see the change in port

API and ABI breaking changes

If this is an API or ABI breaking change, please apply the
corresponding GitHub label.

This is technically breaking but not in a way that actually matters. I've only updated the docker-compose file, not the default port (which is actually still set to 80 right now).

This is now a somewhat larger breaking change because everywhere where we use this docker container and we're not using the default docker-compose.yml then we have to update the port to be 3000 instead of 80. Notibly this will likely affect our ansible playbooks.

Expected complexity level and risk

How complicated do you think these changes are? Grade on a scale from 1 to 5,
where 1 is a trivial change, and 5 is a deep-reaching and complex change.

This complexity rating applies not only to the complexity apparent in the diff,
but also to its interactions with existing and future code.

If you answered more than a 2, explain what is complex about the PR,
and what other components it interacts with in potentially concerning ways.

1

Testing

Describe any testing you've done, and any testing you'd like your reviewers to do,
so that you're confident that all the changes work as expected!

  • Use docker-compose up to bring the container up and try to connect to it. It should work exactly as it worked before except now the start-up printout has been updated to use port 3000 internally.

@bfops bfops removed their request for review August 23, 2024 16:05
@jdetter jdetter force-pushed the jdetter/change-internal-docker-port-to-3000 branch from 607162e to bf04dd9 Compare August 23, 2024 17:31
Copy link
Contributor

@kurtismullins kurtismullins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. We will need to fix references and usage in other places including:

  • spacetimedb.com's instructions to download and use it
  • any servers using the pre-existing image that get upgraded
  • any docs that reference the port number in the Docker container

@jdetter
Copy link
Collaborator Author

jdetter commented Aug 23, 2024

Looks good to me. We will need to fix references and usage in other places including:

  • spacetimedb.com's instructions to download and use it
  • any servers using the pre-existing image that get upgraded
  • any docs that reference the port number in the Docker container

I've created a PR in our internal repo for the website which needs to be rolled out as part of 0.12, the latter 2 points here I think we will have to fix as we find things that are wrong. I will do a quick pass on the spacetime-docs repo to see if there anything in there that needs to be updated and if I find anything I will open PR(s)

@jdetter jdetter added this pull request to the merge queue Aug 23, 2024
Merged via the queue into master with commit 4e530a5 Aug 23, 2024
10 checks passed
@bfops bfops added the api-break A PR that makes an API breaking change label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-break A PR that makes an API breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants