chore: initial commit for main
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
FROM rust:1.83-bookworm AS build
|
||||
|
||||
# Install protoc
|
||||
RUN apt-get update && apt-get install -y protobuf-compiler && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
COPY apps/daemon/ .
|
||||
|
||||
RUN cargo build --release
|
||||
|
||||
# --- Production ---
|
||||
FROM debian:bookworm-slim AS production
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
libssl3 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/target/release/gamepanel-daemon /app/gamepanel-daemon
|
||||
|
||||
# Data directories
|
||||
RUN mkdir -p /var/lib/gamepanel/servers /var/lib/gamepanel/backups /etc/gamepanel
|
||||
|
||||
EXPOSE 50051
|
||||
HEALTHCHECK --interval=30s --timeout=5s CMD /app/gamepanel-daemon --health-check || exit 1
|
||||
|
||||
CMD ["/app/gamepanel-daemon"]
|
||||
Reference in New Issue
Block a user