fix: update Dockerfiles to install necessary packages without recommendations
Some checks failed
Build and Deploy Thoughts / build-and-deploy-local (push) Failing after 3m4s
Some checks failed
Build and Deploy Thoughts / build-and-deploy-local (push) Failing after 3m4s
This commit is contained in:
@@ -26,7 +26,7 @@ RUN cargo build --release --bin thoughts-backend
|
|||||||
|
|
||||||
FROM debian:13-slim AS runtime
|
FROM debian:13-slim AS runtime
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y openssl && rm -rf /var/lib/apt/lists/*
|
RUN apt-get update && apt-get install -y --no-install-recommends openssl wget && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN groupadd --system --gid 1001 appgroup && \
|
RUN groupadd --system --gid 1001 appgroup && \
|
||||||
useradd --system --uid 1001 --gid appgroup appuser
|
useradd --system --uid 1001 --gid appgroup appuser
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
use axum::{extract::State, routing::get, Router};
|
use axum::{extract::State, http::StatusCode, routing::get, Router};
|
||||||
use sea_orm::{ConnectionTrait, Statement};
|
use sea_orm::{ConnectionTrait, Statement};
|
||||||
|
|
||||||
use app::state::AppState;
|
use app::state::AppState;
|
||||||
@@ -25,6 +25,12 @@ async fn root_get(state: State<AppState>) -> Result<String, ApiError> {
|
|||||||
result.unwrap().try_get_by(0).map_err(|e| e.into())
|
result.unwrap().try_get_by(0).map_err(|e| e.into())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn create_root_router() -> Router<AppState> {
|
async fn health_check() -> StatusCode {
|
||||||
Router::new().route("/", get(root_get))
|
StatusCode::OK
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn create_root_router() -> Router<AppState> {
|
||||||
|
Router::new()
|
||||||
|
.route("/", get(root_get))
|
||||||
|
.route("/health", get(health_check))
|
||||||
}
|
}
|
||||||
|
@@ -17,6 +17,8 @@ RUN bun run build
|
|||||||
|
|
||||||
FROM node:22-slim AS release
|
FROM node:22-slim AS release
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends netcat-openbsd && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY --from=builder /app/public ./public
|
COPY --from=builder /app/public ./public
|
||||||
COPY --from=builder /app/.next/standalone ./
|
COPY --from=builder /app/.next/standalone ./
|
||||||
COPY --from=builder /app/.next/static ./.next/static
|
COPY --from=builder /app/.next/static ./.next/static
|
||||||
|
Reference in New Issue
Block a user