File tree Expand file tree Collapse file tree 6 files changed +1008
-28
lines changed
Expand file tree Collapse file tree 6 files changed +1008
-28
lines changed Original file line number Diff line number Diff line change 1+ .venv
Original file line number Diff line number Diff line change 1- FROM sourcepole/qwc-uwsgi-base:alpine-v2023.10.26
1+ FROM sourcepole/qwc-uwsgi-base:alpine-v2025.01.24
22
3- ADD requirements.txt /srv/qwc_service/requirements.txt
3+ WORKDIR /srv/qwc_service
4+ ADD pyproject.toml uv.lock ./
45
56# git: Required for pip with git repos
67# postgresql-dev g++ python3-dev: Required for psycopg2
78RUN \
89 apk add --no-cache --update --virtual runtime-deps postgresql-libs && \
910 apk add --no-cache --update --virtual build-deps git postgresql-dev g++ python3-dev && \
10- pip3 install --no-cache-dir -r /srv/qwc_service/requirements.txt && \
11+ uv sync --frozen && \
1112 apk del build-deps
1213
1314ADD src /srv/qwc_service/
Original file line number Diff line number Diff line change @@ -187,25 +187,13 @@ For more information please visit: https://github.com/qwc-services/qwc-docker
187187Development
188188-----------
189189
190- Create a virtual environment :
190+ Install dependencies and run service :
191191
192- virtualenv --python=/usr/bin/python3 --system-site-packages .venv
192+ uv run src/server.py
193193
194- Without system packages :
194+ With config path :
195195
196- python3 -m venv .venv
197-
198- Activate virtual environment:
199-
200- source .venv/bin/activate
201-
202- Install requirements:
203-
204- pip install -r requirements.txt
205-
206- Start local service:
207-
208- CONFIG_PATH=/PATH/TO/CONFIGS/ python src/server.py
196+ CONFIG_PATH=/PATH/TO/CONFIGS/ uv run src/server.py
209197
210198
211199Testing
Original file line number Diff line number Diff line change 1+ [project ]
2+ name = " qwc-data-service"
3+ version = " v2025.01.22"
4+ description = " QWC Data Service"
5+ readme = " README.md"
6+ requires-python = " >=3.10"
7+ dependencies = [
8+ " Flask~=3.0.0" ,
9+ " Werkzeug~=3.0.6" ,
10+ " Flask-JWT-Extended~=4.6.0" ,
11+ " flask-restx~=1.3.0" ,
12+ " psycopg2~=2.9.9" ,
13+ " requests~=2.32.0" ,
14+ " SQLAlchemy~=2.0.29" ,
15+ " clamd~=1.0.2" ,
16+ " qwc-services-core~=1.3.34"
17+ ]
18+
19+ [dependency-groups ]
20+ dev = [
21+ " python-dotenv>=1.0.1" ,
22+ ]
You can’t perform that action at this time.
0 commit comments