- Add CLAUDE.md at root and AGENTS.md in apps/api, apps/indexer, apps/backoffice, crates/parsers with module-specific guidelines - Unify all service ports to 70XX (no more internal/external split): API 7080, Indexer 7081, Backoffice 7082 - Update docker-compose.yml, Dockerfiles, config.rs defaults, .env.example, backoffice routes, bench.sh, smoke.sh Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
31 lines
1.1 KiB
Docker
31 lines
1.1 KiB
Docker
FROM rust:1-bookworm AS builder
|
|
WORKDIR /app
|
|
|
|
# Install sccache for faster builds
|
|
RUN cargo install sccache --locked
|
|
ENV RUSTC_WRAPPER=sccache
|
|
ENV SCCACHE_DIR=/sccache
|
|
|
|
COPY Cargo.toml ./
|
|
COPY apps/api/Cargo.toml apps/api/Cargo.toml
|
|
COPY apps/indexer/Cargo.toml apps/indexer/Cargo.toml
|
|
COPY crates/core/Cargo.toml crates/core/Cargo.toml
|
|
COPY crates/parsers/Cargo.toml crates/parsers/Cargo.toml
|
|
COPY apps/api/src apps/api/src
|
|
COPY apps/indexer/src apps/indexer/src
|
|
COPY crates/core/src crates/core/src
|
|
COPY crates/parsers/src crates/parsers/src
|
|
|
|
# Build with sccache (cache persisted between builds via Docker cache mount)
|
|
RUN --mount=type=cache,target=/sccache \
|
|
cargo build --release -p api
|
|
|
|
FROM debian:bookworm-slim
|
|
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates wget unar poppler-utils locales && rm -rf /var/lib/apt/lists/*
|
|
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
|
|
ENV LANG=en_US.UTF-8
|
|
ENV LC_ALL=en_US.UTF-8
|
|
COPY --from=builder /app/target/release/api /usr/local/bin/api
|
|
EXPOSE 7080
|
|
CMD ["/usr/local/bin/api"]
|