-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add --docker flag to neb server to start local nebulous instance #47
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
base: main
Are you sure you want to change the base?
Conversation
…e via docker compose
f585f9f to
006586e
Compare
deploy/docker/docker-compose.yaml
Outdated
| RUST_LOG: debug | ||
| NEBU_BUCKET_NAME: nebulous | ||
| NEBU_BUCKET_REGION: us-east-1 | ||
| NEBU_ROOT_OWNER: me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's pass these values through from the CLI and/or the environment.
nebu serve --docker and nebu serve should lead to the same server configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are probably more values that are missing here, e.g., the auth configuration
| @@ -0,0 +1,50 @@ | |||
| services: | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're missing a redis service
deploy/docker/docker-compose.yaml
Outdated
| - TS_STATE_DIR=/var/lib/tailscale | ||
| - TS_USERSPACE=true | ||
| - TS_AUTH_KEY= | ||
| - TS_EXTRA_ARGS=--login-server https://headscale.nebulous.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The login server should be passed through from the CLI and/or the environment.
This entire line can be omitted when running native tailscale, or set to "https://login.tailscale.com", which is what we do in the Helm chart.
deploy/docker/docker-compose.yaml
Outdated
| hostname: nebulous | ||
| environment: | ||
| - TS_STATE_DIR=/var/lib/tailscale | ||
| - TS_USERSPACE=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure about that? https://tailscale.com/kb/1112/userspace-networking
According to https://tailscale.com/kb/1282/docker#ts_userspace, this is enabled by default, which might mean that we don't need to do the /dev/net/tun sharing?
In the examples in here that I looked at, they set this to "false" and share /dev/net/tun
deploy/docker/docker-compose.yaml
Outdated
| environment: | ||
| - TS_STATE_DIR=/var/lib/tailscale | ||
| - TS_USERSPACE=true | ||
| - TS_AUTH_KEY= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be passed through from the CLI and/or the environment.
src/commands/serve_cmd.rs
Outdated
|
|
||
| // Set default environment variables for docker mode to prevent validation errors | ||
| if std::env::var("NEBU_BUCKET_NAME").is_err() { | ||
| std::env::set_var("NEBU_BUCKET_NAME", "nebulous"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the default value. Everyone needs their own bucket :-)
src/commands/serve_cmd.rs
Outdated
| std::env::set_var("NEBU_BUCKET_NAME", "nebulous"); | ||
| } | ||
| if std::env::var("NEBU_BUCKET_REGION").is_err() { | ||
| std::env::set_var("NEBU_BUCKET_REGION", "us-east-1"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the default value here as well.
… produce intermediate, binary-only img
No description provided.