/
VVRONGG
/
backside
Обзор
Документация
Войти
/
VVRONGG
/
backside
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
1
CI/CD
Аналитика
Безопасность
master
Dockerfile
24 строки
997 B
VVrongg
add kubec deploy
24 май 2026, 20:16
24 май 2026, 20:16
db9ffee
Код
Авторство
О чём код?
# --- build stage ------------------------------------------------------------- # edition = "2024" needs Rust >= 1.85; `rust:1-bookworm` tracks the latest 1.x. FROM rust:1-bookworm AS build WORKDIR /app # Source needed to compile. `sqlx::migrate!("./migrations")` embeds the migration # SQL into the binary at compile time, so migrations must be present *here* (but # not in the runtime image). All sqlx queries are runtime (no `query!` macros), # so no database connection or .sqlx cache is required to build. COPY Cargo.toml Cargo.lock ./ COPY src ./src COPY migrations ./migrations RUN cargo build --release --locked --bin backside # --- runtime stage ----------------------------------------------------------- # distroless/cc has glibc + ca-certificates and no shell — small and hardened. FROM gcr.io/distroless/cc-debian12 WORKDIR /app COPY --from=build /app/target/release/backside /usr/local/bin/backside ENV BIND_ADDR=0.0.0.0:3000 EXPOSE 3000 ENTRYPOINT ["/usr/local/bin/backside"]