From 9509ebf6d71edf9570cfae75a4ef352c3c76d933 Mon Sep 17 00:00:00 2001 From: Ilya Khait Date: Mon, 2 Dec 2024 15:18:22 +0100 Subject: [PATCH] Add Rust to Docker (#586) * Update `Dockerfile` * Update `main.yml` --- .github/workflows/main.yml | 8 +++++++- Dockerfile | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 58d128985..7d22838b1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,10 +28,16 @@ jobs: - uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + + - name: Install Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + source $HOME/.cargo/env - name: Install id: install run: | + pip install --upgrade pip pip install poetry poetry install --no-root @@ -85,4 +91,4 @@ jobs: push: true tags: | ebl.badw.de/ebl-api:master - ${{format('ebl.badw.de/ebl-api:master.{0}', github.run_number)}} + ${{format('ebl.badw.de/ebl-api:master.{0}', github.run_number)}} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index da651d466..9c6d2cb9e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,8 @@ FROM pypy:3.9-7.3.10 +RUN pip install --upgrade pip +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +ENV PATH="/root/.cargo/bin:${PATH}" RUN pip install poetry EXPOSE 8000 @@ -16,3 +19,4 @@ COPY ./docs ./docs RUN chmod -R a-wx ./docs CMD ["poetry", "run", "waitress-serve", "--port=8000", "--connection-limit=500", "--call", "ebl.app:get_app"] +