From f7a0176de0b7b904ccadcb8d8f4a10e000c0b4b1 Mon Sep 17 00:00:00 2001 From: Artur Lissin Date: Fri, 10 Jul 2026 14:17:53 +0000 Subject: [PATCH 1/2] build: correct production deployment --- Dockerfile | 9 ++++++++- Makefile | 3 ++- bin/deploy/entry_prod.sh | 3 +-- bin/deploy/req.sh | 5 +++-- packages/shared_utils/pyproject.toml | 2 +- uv.lock | 24 ++++++++++++------------ 6 files changed, 27 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7bde2fe..6e2b4b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,12 +56,19 @@ COPY ./${BIN_DEPLOY_HEALTH} /health.sh WORKDIR /tmp/build RUN bash /prep.sh && rm /prep.sh RUN bash /req.sh && rm /req.sh -RUN rm -rf /tmp/build HEALTHCHECK --interval=5m --timeout=3s CMD /health.sh +RUN chown ${USERNAME}:${USERNAME} -R /tmp/build + USER ${USERNAME} +RUN pip install --no-cache-dir *.whl + WORKDIR ${HOME_MAIN} +RUN rm -rf /tmp/build + +ENV PATH="${HOME_MAIN}/.local/bin:${PATH}" + ENTRYPOINT ["/bin/sh", "/entry.sh"] diff --git a/Makefile b/Makefile index b3833c1..5940032 100644 --- a/Makefile +++ b/Makefile @@ -83,7 +83,8 @@ runTests: $(UVE) run tox runBuild: - $(UVE) build + $(UVE) build --package shared-utils + $(UVE) build --package pkg1 runBump: unstaged $(UVE) run cz bump --files-only --yes --changelog diff --git a/bin/deploy/entry_prod.sh b/bin/deploy/entry_prod.sh index 2d355c6..20c866b 100755 --- a/bin/deploy/entry_prod.sh +++ b/bin/deploy/entry_prod.sh @@ -4,6 +4,5 @@ # # SPDX-License-Identifier: Unlicense set -euo pipefail - -echo 'PROD' +pkg1 sleep infinity diff --git a/bin/deploy/req.sh b/bin/deploy/req.sh index 3e5ac25..d877004 100755 --- a/bin/deploy/req.sh +++ b/bin/deploy/req.sh @@ -8,10 +8,11 @@ set -euo pipefail echo "update" dnf -y update echo "installing requirements" -dnf -y install python3 python3-pip git git-lfs make wget coreutils-single jq vim which +dnf -y install python3.13 python3.13-pip git git-lfs make wget coreutils-single jq vim which dnf -y group install "Development Tools" dnf -y install bzip2-devel ncurses-devel libffi-devel \ readline-devel openssl-devel sqlite-devel tk-devel -ln -s /usr/bin/python3 /usr/bin/python +ln -s /usr/bin/python3.13 /usr/bin/python +ln -s /usr/bin/pip3.13 /usr/bin/pip dnf -y install nodejs libatomic echo "requirements installed" diff --git a/packages/shared_utils/pyproject.toml b/packages/shared_utils/pyproject.toml index a4a391b..c4bfb30 100644 --- a/packages/shared_utils/pyproject.toml +++ b/packages/shared_utils/pyproject.toml @@ -4,7 +4,7 @@ [project] classifiers = ["Private :: Do Not Upload"] -name = "shared_utils" +name = "shared-utils" version = "0.9.4" description = "Shared library for packages." readme = "README.md" diff --git a/uv.lock b/uv.lock index 0f1cc83..e2db1cd 100644 --- a/uv.lock +++ b/uv.lock @@ -254,11 +254,11 @@ wheels = [ [[package]] name = "filelock" -version = "3.29.4" +version = "3.29.6" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/e6/dc/be6cbe99670cd6e4ad387123647cb08e0c32975e223f82551e914c5568a6/filelock-3.29.4.tar.gz", hash = "sha256:10cdb3656fc44541cdf30652a93fb10ec6b05325620eb316bd26893e4201538a", size = 63028, upload-time = "2026-06-13T16:12:00.744Z" } +sdist = { url = "https://files.pythonhosted.org/packages/e0/c8/35bdf04fb30755e2ed758f877edf3eb4a243c2463d3a258cc28b18b7a6e2/filelock-3.29.6.tar.gz", hash = "sha256:895c532ef3f4ef04972b9446a8c4e2931a5c399ff3c4be4c9369f2639b80f793", size = 70301, upload-time = "2026-07-06T23:08:08.577Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/13/37/a065dc3bd6e49423a6532c642ca7378d3f467b1ef44c2800c937af7f9739/filelock-3.29.4-py3-none-any.whl", hash = "sha256:dac1648087d5115554850d113e7dd8c83ab2d38e3435dde2d4f163847e57b767", size = 42757, upload-time = "2026-06-13T16:11:59.582Z" }, + { url = "https://files.pythonhosted.org/packages/bb/49/7467c2946ccd9617f7da38187071bdc45bb9a95df51f4d63d6622432ce4e/filelock-3.29.6-py3-none-any.whl", hash = "sha256:14d5f5597d2e0c4dbd774cfb6d8132da1db44da83732aab679d54f7dcf97ab65", size = 45478, upload-time = "2026-07-06T23:08:07.197Z" }, ] [[package]] @@ -622,15 +622,15 @@ wheels = [ [[package]] name = "pymdown-extensions" -version = "11.0" +version = "11.0.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "markdown" }, { name = "pyyaml" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/47/67/f1e79672a5f91985577c7984c9709ca110e4fd37fe7fd167b60422e6ccc2/pymdown_extensions-11.0.tar.gz", hash = "sha256:8269cef0247f9e2d0a62fcea10860aba05c1cbab5470fd4b63230b96434dc589", size = 857049, upload-time = "2026-06-23T02:27:45.146Z" } +sdist = { url = "https://files.pythonhosted.org/packages/21/a9/5f0c535ba3b08fe09270c16808e053a968868242ecbd5676d4e3a488bf28/pymdown_extensions-11.0.1.tar.gz", hash = "sha256:dd2905ae6fc5b75582fafb139a1266ffc754705efa902aa50067fa7ff4f94ec0", size = 857113, upload-time = "2026-07-02T17:59:22.955Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/af/b6/1ae53367e28b9cffa3be7574e13fbe4589694272fd47710fbdbafd3d63c6/pymdown_extensions-11.0-py3-none-any.whl", hash = "sha256:fbc4acb641814fa9d17521bbd21a5240ef739a662f11c06330c4b78c93e954d6", size = 269415, upload-time = "2026-06-23T02:27:43.826Z" }, + { url = "https://files.pythonhosted.org/packages/d6/54/da572c98c0b77626a91b5d3b89f0231d8bff5125c225420908632f8b342d/pymdown_extensions-11.0.1-py3-none-any.whl", hash = "sha256:db3943a62bab7e03af1364f0c4083e64b91fb097675a4b6cceccfbe9a77e5eb2", size = 269455, upload-time = "2026-07-02T17:59:21.271Z" }, ] [[package]] @@ -703,15 +703,15 @@ wheels = [ [[package]] name = "python-discovery" -version = "1.4.2" +version = "1.4.3" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "filelock" }, { name = "platformdirs" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/0b/1a/cbbaf13b730abb0a16b964d984e19f2fe520c21a4dc664051359a3f5a9e7/python_discovery-1.4.2.tar.gz", hash = "sha256:8f3746c4b4968d22afbb97d36e1a0e5b66e6c0f297290f2e95f05b9b8bf18690", size = 70277, upload-time = "2026-06-11T16:10:42.383Z" } +sdist = { url = "https://files.pythonhosted.org/packages/66/26/8b004cc36f430345136f6f00fa1aa9ed596c8ed1e8504625fa79522ff39c/python_discovery-1.4.3.tar.gz", hash = "sha256:ad57d7045a862460d4a235986c33f13ed707d3aeb9153fa47eb7dfd0d4673289", size = 70438, upload-time = "2026-07-03T13:21:51.621Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/1a/82/a70006589557f267f15bd384c0642ad49f0d97b690c3a05b166b9dcbad3b/python_discovery-1.4.2-py3-none-any.whl", hash = "sha256:475803f53b7b2ed6e490e27373f9d8340f7d2eebf9acdaf645d7d714c97bb500", size = 33886, upload-time = "2026-06-11T16:10:41.192Z" }, + { url = "https://files.pythonhosted.org/packages/28/78/9b77ecb4644d1bbea94d29abf78f21c47eca6eb79e9745b702ec0bed2e19/python_discovery-1.4.3-py3-none-any.whl", hash = "sha256:b6e1e4a7d9e3f6948c39746ffe8218225162d738ba39d05ab1d2f6c1cac4878c", size = 33885, upload-time = "2026-07-03T13:21:50.174Z" }, ] [[package]] @@ -944,7 +944,7 @@ wheels = [ [[package]] name = "virtualenv" -version = "21.5.1" +version = "21.6.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "distlib" }, @@ -952,9 +952,9 @@ dependencies = [ { name = "platformdirs" }, { name = "python-discovery" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/f1/a5/81f987504738e6defeed61ec1c47e2aefab3c35d8eeb87e1b3f38cf28254/virtualenv-21.5.1.tar.gz", hash = "sha256:dca3bf98275a59c652b69d68e73433e597d977c2da9198882479d1a7188009c8", size = 4578798, upload-time = "2026-06-16T16:23:58.603Z" } +sdist = { url = "https://files.pythonhosted.org/packages/74/65/ec1d92091671e6407d3e7c1f5801413bb7b2b57630a50cae7750456ba0ed/virtualenv-21.6.0.tar.gz", hash = "sha256:e18a4d750f2b64dea73e72ffde3922f3c52365fabdc8157ebd3da20d031c4734", size = 5526111, upload-time = "2026-07-06T22:49:56.972Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/2c/02/3623e6169bed617ed1e2d372f7c69f92ec28d54c4dfc997055c8578ec148/virtualenv-21.5.1-py3-none-any.whl", hash = "sha256:55aa670b67bbfb991b03fda39bd3276d92c419d702376e98c5df1c9989a26783", size = 4558820, upload-time = "2026-06-16T16:23:56.963Z" }, + { url = "https://files.pythonhosted.org/packages/b8/e7/2fbd0cc1653c53eed8f10670538bb547de2b3e37aacad283faa82a71094b/virtualenv-21.6.0-py3-none-any.whl", hash = "sha256:bce9d097950fef9d81129b333babfb7767072850c2f1acce0ec536708401bfd1", size = 5506216, upload-time = "2026-07-06T22:49:54.941Z" }, ] [[package]] From 1a275a3ba373b4be0e0ac8a3740dbf8360e25965 Mon Sep 17 00:00:00 2001 From: Artur Lissin Date: Fri, 10 Jul 2026 14:25:21 +0000 Subject: [PATCH 2/2] fix: add correct build steps --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6e2b4b5..346073a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -63,7 +63,8 @@ RUN chown ${USERNAME}:${USERNAME} -R /tmp/build USER ${USERNAME} -RUN pip install --no-cache-dir *.whl +RUN pip install --no-cache-dir shared_utils*.whl +RUN pip install --no-cache-dir pkg1*.whl WORKDIR ${HOME_MAIN}