File tree Expand file tree Collapse file tree 9 files changed +15
-11
lines changed
GeoHealthCheck/migrations/versions Expand file tree Collapse file tree 9 files changed +15
-11
lines changed Original file line number Diff line number Diff line change 1- FROM ubuntu:jammy
1+ FROM ubuntu:noble
22
33# Credits to yjacolin for providing first versions
44LABEL original_developer="yjacolin <yves.jacolin@camptocamp.com>" \
@@ -18,7 +18,7 @@ ENV LC_ALL="en_US.UTF-8" \
1818 LANGUAGE="en_US.UTF-8" \
1919 \
2020 \
21- DEB_PACKAGES="locales gunicorn postgresql-client python3-gunicorn python3-gevent python3-psycopg2 python3-lxml python3-pyproj" \
21+ DEB_PACKAGES="locales gunicorn python3.12-venv postgresql-client python3-gunicorn python3-gevent python3-psycopg2 python3-lxml python3-pyproj" \
2222 DEB_BUILD_DEPS="make python3-pip" \
2323 # GHC ENV settings\
2424 ADMIN_NAME=admin \
Original file line number Diff line number Diff line change 77"""
88from alembic import op
99import sqlalchemy as sa
10- import imp
11- import os
1210from GeoHealthCheck .migrations import alembic_helpers
1311
1412# revision identifiers, used by Alembic.
Original file line number Diff line number Diff line change 77"""
88from alembic import op
99import sqlalchemy as sa
10- import imp
11- import os
1210from GeoHealthCheck .migrations import alembic_helpers
1311
1412# revision identifiers, used by Alembic.
Original file line number Diff line number Diff line change 77"""
88from alembic import op
99import sqlalchemy as sa
10- import imp
11- import os
1210from GeoHealthCheck .migrations import alembic_helpers
1311
1412# revision identifiers, used by Alembic.
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ echo "Using DB_TYPE=${DB_TYPE}"
1313# Create DB shorthand
1414function create_db() {
1515 pushd /GeoHealthCheck/ || exit 1
16+ source bin/activate
17+
1618 paver create -u ${ADMIN_NAME} -p ${ADMIN_PWD} -e ${ADMIN_EMAIL}
1719 popd || exit 1
1820}
Original file line number Diff line number Diff line change 55# e.g. fetching Metadata (Caps) and testing all layers
66# Install Python packages for installation and setup
77
8+ python3 -m venv GeoHealthCheck
89pushd /GeoHealthCheck || exit 1
910
11+ source bin/activate
12+
13+
1014# Docker-specific deps
11- pip install -r docker/scripts/requirements.txt
15+ pip install --no-cache-dir - r docker/scripts/requirements.txt
1216
1317# Sets up GHC itself
1418paver setup
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ echo "START /run-runner.sh"
1212export PYTHONPATH=/GeoHealthCheck/GeoHealthCheck:$PYTHONPATH
1313
1414cd /GeoHealthCheck
15+ source bin/activate
1516paver runner_daemon
1617
1718echo " END /run-runner.sh"
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ echo "START /run-tests.sh"
1717export PYTHONPATH=/GeoHealthCheck/GeoHealthCheck:$PYTHONPATH
1818
1919cd /GeoHealthCheck
20+ source bin/activate
2021paver run_tests
2122
2223echo " END /run-tests.sh"
Original file line number Diff line number Diff line change @@ -13,15 +13,17 @@ echo "START /run-web.sh"
1313# Make sure PYTHONPATH includes GeoHealthCheck
1414export PYTHONPATH=/GeoHealthCheck/GeoHealthCheck:$PYTHONPATH
1515
16- cd /GeoHealthCheck
16+ pushd /GeoHealthCheck || exit 1
17+
18+ source bin/activate
1719
1820paver upgrade
1921
2022# SCRIPT_NAME should not have value '/'
2123[ " ${SCRIPT_NAME} " = ' /' ] && export SCRIPT_NAME=" " && echo " make SCRIPT_NAME empty from /"
2224
2325echo " Running GHC WSGI on ${HOST} :${PORT} with ${WSGI_WORKERS} workers and SCRIPT_NAME=${SCRIPT_NAME} "
24- exec gunicorn --workers ${WSGI_WORKERS} \
26+ exec gunicorn --pythonpath /GeoHealthCheck/lib/python3.12/site-packages/ -- workers ${WSGI_WORKERS} \
2527 --worker-class=${WSGI_WORKER_CLASS} \
2628 --timeout ${WSGI_WORKER_TIMEOUT} \
2729 --name=" Gunicorn_GHC" \
You can’t perform that action at this time.
0 commit comments