feat: add --docker flag to neb server to start local nebulous instance#47
feat: add --docker flag to neb server to start local nebulous instance#47philippschroeppel wants to merge 23 commits intomainfrom
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.
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.
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.
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.
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.
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.
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.
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.
Please remove the default value here as well.
… produce intermediate, binary-only img
No description provided.