-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (27 loc) · 1015 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM rust:1.67 as builder
RUN apt update && apt install -y protobuf-compiler && rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/ronin
COPY ./migration ./migration
COPY ./src ./src
COPY ./.envrc ./.envrc
COPY ./Cargo.lock ./Cargo.lock
COPY ./Cargo.toml ./Cargo.toml
RUN cargo --locked install --path . --profile release
FROM debian:bullseye-slim
COPY --from=builder /usr/local/cargo/bin/ingestor /usr/local/bin/ingestor
ENV RUST_BACKTRACE=full
LABEL org.opencontainers.image.authors="Stefan Kecskes"
LABEL org.opencontainers.image.vendor="Stefan Kecskes"
LABEL org.opencontainers.image.source="[email protected]:skecskes/ronin-ingestor.git"
LABEL org.opencontainers.image.licenses="UNLICENSED"
ENV PGHOST="localhost"
ENV PGUSER="postgres"
ENV PGPASSWORD="postgres"
ENV PGPORT=5432
ENV PGDATABASE="devdb"
ENV DATABASE_URL="postgres://$POSTGRES_USER@$POSTGRES_HOST:$POSTGRES_PORT/$POSTGRES_DB"
ENV RPC_URL="http://ronin.tribally.xyz"
ENV BLOCKS_TO_INGEST=10000
ENV BLOCKS_CHUNK_SIZE=100
EXPOSE 3000
CMD ["ingestor"]