-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.harebell
More file actions
32 lines (23 loc) · 854 Bytes
/
Dockerfile.harebell
File metadata and controls
32 lines (23 loc) · 854 Bytes
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
# syntax=docker/dockerfile:1.7
FROM --platform=linux/amd64 rust:1.94
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
cmake \
protobuf-compiler \
libssl-dev \
libpq-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY backend/Cargo.toml ./
COPY backend/src ./src
COPY backend/migrations ./migrations
COPY backend/diesel.toml ./
RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked \
--mount=type=cache,target=/usr/local/cargo/git,sharing=locked \
--mount=type=cache,target=/app/target,sharing=locked \
RUST_MIN_STACK=16777216 cargo build --profile pipeline --bin harebell
RUN mkdir -p /output /app/tiles && cp ./target/pipeline/harebell /output/
WORKDIR /app
EXPOSE 8080
CMD ["/output/harebell", "serve", "--address", "0.0.0.0", "--port", "8080"]