Skip to content

Commit

Permalink
Rename core dust-api into core-api (#8970)
Browse files Browse the repository at this point in the history
* rename dust-api / core-api

* tweaks
  • Loading branch information
spolu authored Nov 27, 2024
1 parent f0cd00e commit 0b5ddeb
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
{
"type": "lldb",
"request": "launch",
"name": "Debug dust-api",
"name": "Debug core-api",
"cargo": {
"args": [
"build",
"--bin=dust-api",
"--bin=core-api",
"--manifest-path=${workspaceFolder}/core/Cargo.toml"
],
"filter": {
"name": "dust-api",
"name": "core-api",
"kind": "bin"
}
},
Expand Down Expand Up @@ -46,4 +46,4 @@
"envFile": "${workspaceFolder}/front/.env.local",
}
]
}
}
6 changes: 5 additions & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ edition = "2021"

# SERVICES

[[bin]]
name = "core-api"
path = "bin/core_api.rs"

[[bin]]
name = "dust-api"
path = "bin/dust_api.rs"
path = "bin/core_api.rs"

[[bin]]
name = "oauth"
Expand Down
4 changes: 2 additions & 2 deletions core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ WORKDIR /app

COPY . .

RUN cargo build --release --bin dust-api --bin sqlite-worker
RUN cargo build --release --bin core-api --bin dust-api --bin sqlite-worker

EXPOSE 3001

# Set a default command, it will start the API service if no command is provided
CMD ["cargo", "run", "--release", "--bin", "dust-api"]
CMD ["cargo", "run", "--release", "--bin", "core-api"]
2 changes: 1 addition & 1 deletion core/admin/dev.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
cargo run --bin dust-api
cargo run --bin core-api
4 changes: 1 addition & 3 deletions core/bin/dust_api.rs → core/bin/core_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use axum::{
routing::{delete, get, patch, post},
Router,
};
use futures::future::{try_join, try_join_all};
use futures::future::try_join_all;
use hyper::http::StatusCode;
use parking_lot::Mutex;
use serde_json::{json, Value};
Expand Down Expand Up @@ -3148,8 +3148,6 @@ fn main() {

let rt = tokio::runtime::Builder::new_multi_thread()
.worker_threads(32)
//.thread_name("dust-api-server")
//.thread_stack_size(32 * 1024 * 1024)
.enable_all()
.build()
.unwrap();
Expand Down
2 changes: 1 addition & 1 deletion k8s/dust-kube/deployments/core-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
containers:
- name: web
image: gcr.io/or1g1n-186209/core-image:latest
command: ["cargo", "run", "--release", "--bin", "dust-api"]
command: ["cargo", "run", "--release", "--bin", "core-api"]
imagePullPolicy: Always
ports:
- containerPort: 3001
Expand Down

0 comments on commit 0b5ddeb

Please sign in to comment.