File tree Expand file tree Collapse file tree 5 files changed +11
-17
lines changed Expand file tree Collapse file tree 5 files changed +11
-17
lines changed Original file line number Diff line number Diff line change 11FROM python:3.11.3-slim-buster
22
3- ENV PIP_DEFAULT_TIMEOUT=100 \
4- GUNICORN_VERSION=20.1.0
5-
63RUN apt-get update
74# working with timezones
85RUN apt-get install --no-install-recommends --yes tzdata
@@ -11,20 +8,7 @@ RUN apt-get install --no-install-recommends --yes librdkafka-dev python3-dev
118# psycopg2 needs these
129RUN apt-get install --no-install-recommends --yes build-essential libpq-dev
1310
14- # upgrading pip solves many installation problems
15- RUN pip3 install --upgrade pip
16- RUN pip3 install "gunicorn==$GUNICORN_VERSION"
17-
18- WORKDIR /app
19-
20- # leverage Docker cache
21- COPY requirements.lock ./
22- RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -r requirements.lock
23-
24- COPY config.example.yml ./config.yml
25-
26- ARG VCS_REVISION
27- RUN echo "$VCS_REVISION" > ./version
11+ RUN --mount=source=dist,target=/dist PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir /dist/*.whl
2812
2913COPY src/rkapi .
3014
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ check: fmt-check lint test
2626
2727# Build the docker image.
2828image-build :
29+ rye build --wheel --clean
2930 docker build -t restknot-api:latest --build-arg VCS_REVISION=$(git rev-parse --short HEAD) .
3031
3132# Run the container image.
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ dependencies = [
1717 " python-dotenv==1.0.0" ,
1818 " PyYAML==6.0" ,
1919 " requests==2.28.2" ,
20+ " gunicorn==20.1.0" ,
2021]
2122readme = " README.md"
2223requires-python = " >= 3.11"
Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ flask-cors==3.0.10
3030 # via rkapi
3131flask-restful==0.3.9
3232 # via rkapi
33+ gunicorn==20.1.0
34+ # via rkapi
3335idna==3.7
3436 # via requests
3537iniconfig==2.0.0
@@ -64,6 +66,8 @@ pyyaml==6.0
6466 # via rkapi
6567requests==2.28.2
6668 # via rkapi
69+ setuptools==72.1.0
70+ # via gunicorn
6771six==1.16.0
6872 # via flask-cors
6973 # via flask-restful
Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ flask-cors==3.0.10
3030 # via rkapi
3131flask-restful==0.3.9
3232 # via rkapi
33+ gunicorn==20.1.0
34+ # via rkapi
3335idna==3.7
3436 # via requests
3537itsdangerous==2.2.0
@@ -56,6 +58,8 @@ pyyaml==6.0
5658 # via rkapi
5759requests==2.28.2
5860 # via rkapi
61+ setuptools==72.1.0
62+ # via gunicorn
5963six==1.16.0
6064 # via flask-cors
6165 # via flask-restful
You can’t perform that action at this time.
0 commit comments