From 9a074f074e9a512406529842aa3296a1c744b092 Mon Sep 17 00:00:00 2001 From: loki Date: Sat, 21 Jun 2025 20:50:28 +1000 Subject: [PATCH 1/2] prod ready --- gunicorn.py | 1 + pyproject.toml | 1 + uv.lock | 17 +++++++++++++++++ 3 files changed, 19 insertions(+) diff --git a/gunicorn.py b/gunicorn.py index 166fe4e..f74a347 100644 --- a/gunicorn.py +++ b/gunicorn.py @@ -8,3 +8,4 @@ accesslog = "-" errorlog = "-" loglevel = "info" +wsgi_app = "app:create_app()" diff --git a/pyproject.toml b/pyproject.toml index ea2ef3c..0815cb5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,6 +17,7 @@ dependencies = [ "gevent>=25.5.1", "gunicorn>=23.0.0", "markdown>=3.7", + "psycopg2>=2.9.10", "python-dotenv>=1.0.1", ] diff --git a/uv.lock b/uv.lock index 9f6e849..2a31bce 100644 --- a/uv.lock +++ b/uv.lock @@ -369,6 +369,7 @@ dependencies = [ { name = "gevent" }, { name = "gunicorn" }, { name = "markdown" }, + { name = "psycopg2" }, { name = "python-dotenv" }, ] @@ -391,6 +392,7 @@ requires-dist = [ { name = "gevent", specifier = ">=25.5.1" }, { name = "gunicorn", specifier = ">=23.0.0" }, { name = "markdown", specifier = ">=3.7" }, + { name = "psycopg2", specifier = ">=2.9.10" }, { name = "python-dotenv", specifier = ">=1.0.1" }, ] @@ -585,6 +587,21 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/88/5f/e351af9a41f866ac3f1fac4ca0613908d9a41741cfcf2228f4ad853b697d/pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669", size = 20556, upload-time = "2024-04-20T21:34:40.434Z" }, ] +[[package]] +name = "psycopg2" +version = "2.9.10" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/62/51/2007ea29e605957a17ac6357115d0c1a1b60c8c984951c19419b3474cdfd/psycopg2-2.9.10.tar.gz", hash = "sha256:12ec0b40b0273f95296233e8750441339298e6a572f7039da5b260e3c8b60e11", size = 385672, upload-time = "2024-10-16T11:24:54.832Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0a/a9/146b6bdc0d33539a359f5e134ee6dda9173fb8121c5b96af33fa299e50c4/psycopg2-2.9.10-cp310-cp310-win32.whl", hash = "sha256:5df2b672140f95adb453af93a7d669d7a7bf0a56bcd26f1502329166f4a61716", size = 1024527, upload-time = "2024-10-16T11:18:24.43Z" }, + { url = "https://files.pythonhosted.org/packages/47/50/c509e56f725fd2572b59b69bd964edaf064deebf1c896b2452f6b46fdfb3/psycopg2-2.9.10-cp310-cp310-win_amd64.whl", hash = "sha256:c6f7b8561225f9e711a9c47087388a97fdc948211c10a4bccbf0ba68ab7b3b5a", size = 1163735, upload-time = "2024-10-16T11:18:29.586Z" }, + { url = "https://files.pythonhosted.org/packages/20/a2/c51ca3e667c34e7852157b665e3d49418e68182081060231d514dd823225/psycopg2-2.9.10-cp311-cp311-win32.whl", hash = "sha256:47c4f9875125344f4c2b870e41b6aad585901318068acd01de93f3677a6522c2", size = 1024538, upload-time = "2024-10-16T11:18:33.48Z" }, + { url = "https://files.pythonhosted.org/packages/33/39/5a9a229bb5414abeb86e33b8fc8143ab0aecce5a7f698a53e31367d30caa/psycopg2-2.9.10-cp311-cp311-win_amd64.whl", hash = "sha256:0435034157049f6846e95103bd8f5a668788dd913a7c30162ca9503fdf542cb4", size = 1163736, upload-time = "2024-10-16T11:18:36.616Z" }, + { url = "https://files.pythonhosted.org/packages/3d/16/4623fad6076448df21c1a870c93a9774ad8a7b4dd1660223b59082dd8fec/psycopg2-2.9.10-cp312-cp312-win32.whl", hash = "sha256:65a63d7ab0e067e2cdb3cf266de39663203d38d6a8ed97f5ca0cb315c73fe067", size = 1025113, upload-time = "2024-10-16T11:18:40.148Z" }, + { url = "https://files.pythonhosted.org/packages/66/de/baed128ae0fc07460d9399d82e631ea31a1f171c0c4ae18f9808ac6759e3/psycopg2-2.9.10-cp312-cp312-win_amd64.whl", hash = "sha256:4a579d6243da40a7b3182e0430493dbd55950c493d8c68f4eec0b302f6bbf20e", size = 1163951, upload-time = "2024-10-16T11:18:44.377Z" }, + { url = "https://files.pythonhosted.org/packages/ae/49/a6cfc94a9c483b1fa401fbcb23aca7892f60c7269c5ffa2ac408364f80dc/psycopg2-2.9.10-cp313-cp313-win_amd64.whl", hash = "sha256:91fd603a2155da8d0cfcdbf8ab24a2d54bca72795b90d2a3ed2b6da8d979dee2", size = 2569060, upload-time = "2025-01-04T20:09:15.28Z" }, +] + [[package]] name = "pycparser" version = "2.22" From fcc44769b2fb9c0adb4f308e7393e5b97fb67f57 Mon Sep 17 00:00:00 2001 From: loki Date: Sat, 21 Jun 2025 20:56:35 +1000 Subject: [PATCH 2/2] deploy fix --- .github/deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/deploy.sh b/.github/deploy.sh index a2488eb..fa4cc62 100755 --- a/.github/deploy.sh +++ b/.github/deploy.sh @@ -12,7 +12,7 @@ git reset --hard origin/$BRANCH # Optionally run build or install commands here if needed # e.g., npm install, yarn install for Node.js projects -uv sync +/home/loki/.local/bin/uv sync || exit # Restart services using sudo sudo systemctl restart gunlinux.ru