-
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
Open
philippschroeppel
wants to merge
23
commits into
main
Choose a base branch
from
feature_neb-serve-docker
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
e55c0de
feat: add --docker flag to neb server to start local nebulous instanc…
philippschroeppel 4d43112
fix: docker-compose -> docker compose
philippschroeppel d1f1989
dev: add .vscode to .gitignore
philippschroeppel 7040a96
feat: pull prebuilt nebuluos image
philippschroeppel 9d27413
fix: remove --build arg and adjust error msg to new docker-compose.yml
philippschroeppel 56913e7
dev: *.yml -> *.yaml
philippschroeppel 23199a1
fix: add tailscale service
philippschroeppel ea4788e
fix: add volumes
philippschroeppel 006586e
debug: print final list of tags before building
philippschroeppel 367df06
feat: complete docker-compose.yaml
ionicsolutions f0092fa
feat: bollard-based serve --docker
ionicsolutions ea43991
fix: remove default value for bucket name
philippschroeppel 47ca142
fix: remove default value for bucket region
philippschroeppel 37c0849
feat: streamline Docker build (binary-only and binary-with tools) and…
philippschroeppel 48e6f4b
feat: publish intermediate, binary-only img
philippschroeppel 67e6133
fix: file path and keyword caps
philippschroeppel c2e0e00
fix: do not copy Cargo.lock
philippschroeppel e323520
fix: env var names
philippschroeppel 1cbde92
fix: run serve cmd via compose
philippschroeppel 1f2dbc8
fix: add deploy docker-compose to img
philippschroeppel 7c0dd11
feat: set env var for deploy docker compose from SERVER_CONFIG
philippschroeppel baee8a1
fix: use name prefix (slim-) for binary only image instead of tags
philippschroeppel 5445d51
fix: one build step
philippschroeppel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -25,4 +25,7 @@ Cargo.lock | |
| /target | ||
|
|
||
| .envrc | ||
| .testenv | ||
| .testenv | ||
|
|
||
| #VSCode | ||
| .vscode | ||
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| FROM rust:1.88-slim-bullseye AS builder | ||
|
|
||
| RUN apt-get update && apt-get install -y \ | ||
| pkg-config \ | ||
| libssl-dev \ | ||
| build-essential \ | ||
| g++ \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| WORKDIR /usr/src/nebulous | ||
| COPY ./Cargo.toml ./Cargo.lock ./ | ||
|
|
||
| # Pre-build dependencies to cache them | ||
| RUN mkdir -p src && echo "fn main() {}" > src/main.rs | ||
| RUN cargo build --release || true | ||
| RUN rm -rf src | ||
|
|
||
| COPY ./src ./src | ||
|
|
||
| RUN cargo build --release | ||
|
|
||
|
|
||
| FROM debian:bullseye-slim | ||
|
|
||
| RUN apt-get update && apt-get install -y \ | ||
| ca-certificates \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # COPY --from=builder /usr/src/nebulous/target/debug/nebulous /usr/local/bin/nebulous | ||
| COPY --from=builder /usr/src/nebulous/target/release/nebulous /usr/local/bin/nebulous | ||
|
|
||
| RUN ln -s /usr/local/bin/nebulous /usr/local/bin/nebu | ||
|
|
||
| ENV RUST_LOG=info | ||
| ENV NEBU_BUCKET_NAME=nebulous | ||
| ENV NEBU_BUCKET_REGION=us-east-1 | ||
| ENV NEBU_ROOT_OWNER=me | ||
| ENV TS_APIKEY=dummy | ||
| ENV TS_TAILNET=dummy | ||
|
|
||
| CMD ["nebulous", "--version"] |
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| services: | ||
| postgres: | ||
| image: postgres:17 | ||
| environment: | ||
| POSTGRES_PASSWORD: postgres | ||
| ports: | ||
| - "5432:5432" | ||
| restart: unless-stopped | ||
|
|
||
| redis: | ||
| image: redis:8 | ||
| restart: unless-stopped | ||
| network_mode: service:tailscale | ||
|
|
||
| nebu: | ||
| # image: us-docker.pkg.dev/agentsea-dev/nebulous/server:${NEBU_VERSION:-latest} | ||
| # image: us-docker.pkg.dev/agentsea-dev/nebulous/server:latest | ||
| image: us-docker.pkg.dev/agentsea-dev/nebulous/server:c2e0e00-binary-only | ||
| command: ["sh", "-c", "exec nebu serve --host 0.0.0.0 --port 3000"] | ||
| environment: | ||
| DATABASE_HOST: postgres | ||
| DATABASE_PORT: 5342 | ||
| DATABASE_USER: postgres | ||
| DATABASE_PASSWORD: postgres | ||
| DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres | ||
| REDIS_HOST: localhost | ||
| REDIS_PORT: 6379 | ||
| RUST_LOG: $RUST_LOG | ||
| NEBU_BUCKET_NAME: $NEBU_BUCKET_NAME | ||
| NEBU_BUCKET_REGION: $NEBU_BUCKET_REGION | ||
| NEBU_ROOT_OWNER: $NEBU_ROOT_OWNER | ||
| NEBU_PUBLISH_URL: $NEBU_PUBLISH_URL | ||
| TS_APIKEY: $TS_APIKEY | ||
| TS_TAILNET: $TS_TAILNET | ||
| TS_LOGIN_SERVER: $TS_LOGIN_SERVER | ||
|
|
||
| network_mode: service:tailscale | ||
| depends_on: | ||
| - tailscale | ||
| - postgres | ||
| - redis | ||
|
|
||
| tailscale: | ||
| image: tailscale/tailscale:stable | ||
| container_name: tailscale | ||
| hostname: nebulous | ||
| environment: | ||
| - TS_STATE_DIR=/var/lib/tailscale | ||
| - TS_USERSPACE=false | ||
| - TS_AUTHKEY=$TS_AUTHKEY | ||
| - TS_EXTRA_ARGS=--login-server $TS_LOGIN_SERVER | ||
| volumes: | ||
| - nebu-ts-authkey:/var/lib/tailscale | ||
| - nebu-ts-sock:/var/run/tailscale | ||
| - nebu-tmp:/tmp | ||
| devices: | ||
| - /dev/net/tun:/dev/net/tun | ||
| cap_add: | ||
| - NET_ADMIN | ||
| restart: unless-stopped | ||
|
|
||
|
|
||
|
|
||
| volumes: | ||
| sccache: | ||
| nebu-ts-authkey: | ||
| driver: local | ||
| nebu-ts-sock: | ||
| nebu-tmp: | ||
File renamed without changes.
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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