Skip to content

Commit 6e12897

Browse files
Merge pull request #66 from UIUCLibrary/dev
Dev
2 parents f291cbb + 02bed60 commit 6e12897

File tree

9 files changed

+1097
-542
lines changed

9 files changed

+1097
-542
lines changed

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.11-slim AS base_image
1+
FROM python:3.14-slim AS base_image
22

33
FROM base_image AS builder
44
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
@@ -39,8 +39,7 @@ RUN --mount=type=cache,target=${UV_CACHE_DIR} \
3939
./uv/bin/uv sync --group deploy --no-dev --no-editable --no-install-project --find-links=/wheels && \
4040
./uv/bin/uv pip install --find-links=/wheels --no-index getmarcapi --no-deps
4141
EXPOSE 5000
42-
COPY api.cfg /app/settings.cfg
4342
ENV GETMARCAPI_SETTINGS=/app/settings.cfg
44-
RUN ./.venv/bin/python -m getmarcapi --check
45-
CMD ./.venv/bin/gunicorn getmarcapi.app:app --bind 0.0.0.0:5000 --log-level=debug
43+
HEALTHCHECK --interval=30s --timeout=10s --retries=3 CMD curl -f http://localhost:5000 || exit 1
44+
CMD ./.venv/bin/python -m getmarcapi --check && ./.venv/bin/gunicorn getmarcapi.app:app --bind 0.0.0.0:5000 --log-level=debug
4645

README.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
11
getmarcapi
22
==========
33

4+
Config File
5+
-----------
6+
7+
This application requires a configuration file to run. It should be in INI format
8+
and contain the following sections and options:
9+
10+
.. code-block:: ini
11+
12+
[ALMA_API]
13+
API_DOMAIN=
14+
API_KEY=
15+
16+
17+
Using the Docker Image
18+
----------------------
19+
20+
This Docker image requires a config file (see Config File section above) to be
21+
mounted into the container in order to function properly. By default, the
22+
container will look for the config file at inside the container at
23+
`/app/settings.cfg` but this can be changed by running the container with the
24+
GETMARCAPI_SETTINGS environment variable set to another path.
25+
26+
Port 5000 inside the container is used for the web server, so this port should
27+
be forwarded to the host machine.
28+
29+
For example, you can run the container like this:
30+
31+
.. code-block:: sh
32+
33+
docker run -d -p 5000:5000 -v /path/to/your/settings.cfg:/app/settings.cfg:ro --name getmarc getmarcapi

ci/docker/python/linux/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
ARG PYTHON_VERSION="latest"
2+
3+
FROM ghcr.io/astral-sh/uv:latest AS uv_builder
24
FROM python:${PYTHON_VERSION} AS base_image
35

46
#==============================================================================
@@ -16,5 +18,4 @@ RUN n stable -y && \
1618
mkdir /.npm && \
1719
chmod 777 /.npm
1820

19-
RUN mkdir -p /home/user/.sonar/ && chmod -R 777 /home/user/
20-
21+
COPY --from=uv_builder /uv /uvx /bin/

package-lock.json

Lines changed: 440 additions & 326 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"devDependencies": {
2424
"css-loader": "^6.7.2",
2525
"style-loader": "^3.3.1",
26-
"webpack": "5.75.0",
26+
"webpack": "^5.104.1",
2727
"webpack-cli": "^5.0.0"
2828
},
2929
"dependencies": {

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "getmarcapi"
77
version = "0.0.4.dev0"
88
dependencies = [
99
'flask',
10-
'uiucprescon.getmarc2>=0.1.3',
10+
'uiucprescon.getmarc2>=0.1.5',
1111
'typing-extensions;python_version<"3.8"'
1212
]
1313
requires-python = ">= 3.10"
@@ -21,6 +21,7 @@ maintainers = [
2121
]
2222
description = "Provide MARC XML data"
2323
[dependency-groups]
24+
audit-dependencies = ['uv-secure']
2425
deploy = ['gunicorn', 'python-dotenv']
2526
test = ['pytest']
2627
tox = ["tox"]
@@ -39,6 +40,7 @@ dev = [
3940
{include-group = "publish"},
4041
{include-group = "test"},
4142
{include-group = "tox"},
43+
{include-group = "audit-dependencies"},
4244
]
4345
ci = ["pysonar", {include-group = "dev"}]
4446

@@ -48,6 +50,7 @@ Download = "https://github.com/UIUCLibrary/"
4850
[tool.setuptools]
4951
packages = [
5052
"getmarcapi",
53+
"getmarcapi.templates"
5154
]
5255
include-package-data = true
5356
zip-safe = true

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py310, py311, py312, py313
2+
envlist = py310, py311, py312, py313, py314, py314t
33
isolated_build = true
44
minversion = 2.0
55

uv.lock

Lines changed: 472 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vars/runJenkinsPipeline.groovy

Lines changed: 143 additions & 155 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)