From 2573a0ac5489d279e747c27134e6c01b07bc6fc3 Mon Sep 17 00:00:00 2001 From: Lucky Date: Sun, 24 Dec 2023 23:47:13 +0800 Subject: [PATCH] feat: run with docker --- Dockerfile | 15 +++++++++++++++ compose.yml | 11 +++++++++++ 2 files changed, 26 insertions(+) create mode 100644 Dockerfile create mode 100644 compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a5ba290 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM rustlang/rust:nightly as builder + +WORKDIR /app + +COPY . . + +RUN cargo install --path . + +FROM debian:bullseye-slim + +RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/* + +COPY --from=builder /usr/local/cargo/bin/elex-proxy /usr/local/bin/elex-proxy + +CMD ["elex-proxy"] diff --git a/compose.yml b/compose.yml new file mode 100644 index 0000000..42ad27d --- /dev/null +++ b/compose.yml @@ -0,0 +1,11 @@ +version: '3' +services: + proxy: + image: elex-proxy + build: . + restart: always + ports: + - 12321:12321 + env_file: + - .env +