Skip to content

Commit

Permalink
Add Rust to Docker (#586)
Browse files Browse the repository at this point in the history
* Update `Dockerfile`

* Update `main.yml`
  • Loading branch information
khoidt authored Dec 2, 2024
1 parent 0fc7648 commit 9509ebf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)}}
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"]

0 comments on commit 9509ebf

Please sign in to comment.