mirror of
https://github.com/versia-pub/activitypub.git
synced 2025-12-06 06:38:20 +01:00
feat: Update API domain variable name
The commit updates the variable name for the API domain from `FEDERATED_DOMAIN` to `API_DOMAIN` in the `src/main.rs` file. This change improves clarity and consistency in the codebase.
This commit is contained in:
parent
c7798ac5e4
commit
14322c961f
13
Dockerfile
13
Dockerfile
|
|
@ -1,13 +0,0 @@
|
|||
FROM rust:slim as builder
|
||||
RUN apt-get update && apt-get install -y libpq-dev libssl-dev pkg-config musl-tools perl make && rm -rf /var/lib/apt/lists/*
|
||||
RUN rustup target add x86_64-unknown-linux-musl
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
RUN cargo build --release --target x86_64-unknown-linux-musl
|
||||
RUN strip /app/target/x86_64-unknown-linux-musl/release/microservice
|
||||
|
||||
FROM scratch
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/microservice /microservice
|
||||
WORKDIR /
|
||||
CMD ["/microservice"]
|
||||
|
|
@ -6,4 +6,4 @@ services:
|
|||
- LISTEN=0.0.0.0:8080
|
||||
ports:
|
||||
- 8080:8080
|
||||
image: ghcr.io/lysand-org/activitypub:latest
|
||||
image: ghcr.io/lysand-org/activitypub:main
|
||||
|
|
|
|||
|
|
@ -139,7 +139,8 @@ lazy_static! {
|
|||
static ref DATABASE_URL: String = env::var("DATABASE_URL").expect("DATABASE_URL must be set");
|
||||
static ref USERNAME: String =
|
||||
env::var("LOCAL_USER_NAME").unwrap_or(LOCAL_USER_NAME.to_string());
|
||||
static ref DOMAIN: String = env::var("FEDERATED_DOMAIN").unwrap_or(DOMAIN_DEF.to_string());
|
||||
static ref API_DOMAIN: String = env::var("API_DOMAIN").unwrap_or(DOMAIN_DEF.to_string());
|
||||
static ref FEDERATED_DOMAIN: String = env::var("FEDERATED_DOMAIN").unwrap_or(DOMAIN_DEF.to_string());
|
||||
}
|
||||
|
||||
static DB: OnceLock<DatabaseConnection> = OnceLock::new();
|
||||
|
|
@ -155,12 +156,12 @@ async fn main() -> actix_web::Result<(), anyhow::Error> {
|
|||
|
||||
let ap_id = Url::parse(&format!(
|
||||
"https://{}/{}",
|
||||
DOMAIN.to_string(),
|
||||
API_DOMAIN.to_string(),
|
||||
&USERNAME.to_string()
|
||||
))?;
|
||||
let inbox = Url::parse(&format!(
|
||||
"https://{}/{}/inbox",
|
||||
DOMAIN.to_string(),
|
||||
API_DOMAIN.to_string(),
|
||||
&USERNAME.to_string()
|
||||
))?;
|
||||
let keypair = generate_actor_keypair()?;
|
||||
|
|
|
|||
Loading…
Reference in a new issue