-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.supervisor
More file actions
34 lines (27 loc) · 1 KB
/
Dockerfile.supervisor
File metadata and controls
34 lines (27 loc) · 1 KB
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
# syntax=docker/dockerfile:1
FROM rust:slim-bookworm AS builder
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
pkg-config \
libssl-dev \
libsqlite3-dev \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN rustup toolchain install nightly
COPY Cargo.toml Cargo.lock ./
COPY crates ./crates
COPY worker.toml ./worker.toml
COPY webui ./webui
RUN cargo +nightly build --release -p supervisor
FROM debian:bookworm-slim AS runtime
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates libsqlite3-0 && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=builder /app/target/release/supervisor /usr/local/bin/supervisor
COPY --from=builder /app/worker.toml /app/worker.toml
COPY --from=builder /app/webui /app/webui
ENV SUPERVISOR_HTTP_ADDR=0.0.0.0:21000 \
SUPERVISOR_DATABASE_URL=sqlite:///app/supervisor.db?mode=rwc \
SUPERVISOR_AUTO_APPROVE=1 \
KAGAMI_NATS_URL=nats://nats:4222
EXPOSE 21000
ENTRYPOINT ["/usr/local/bin/supervisor"]