Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions jobs/epic-cron/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ COPY ./requirements.txt .
COPY ./requirements/ ./requirements/

RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# The editable repo libraries currently have incompatible transitive pins. Install
# the cron image dependency set first, then install the repo libraries themselves
# without re-resolving their install_requires.
RUN sed '/^-e git+/d' requirements.txt > /tmp/requirements-no-repos.txt \
&& pip install --no-cache-dir -r /tmp/requirements-no-repos.txt \
&& pip install --no-cache-dir --no-deps -r requirements/repo-libraries.txt

# Copy the rest of the application after pip install to avoid conflicts with git dependencies
COPY . .
Expand All @@ -64,4 +69,4 @@ RUN chown -R $user:root $HOME \
&& chmod g-w $HOME/cron/crontab

USER $user
ENTRYPOINT ["bash", "docker-entrypoint.sh"]
ENTRYPOINT ["bash", "docker-entrypoint.sh"]
3 changes: 3 additions & 0 deletions jobs/epic-cron/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,11 @@ class _Config(): # pylint: disable=too-few-public-methods

CONDITION_API_BASE_URL = os.getenv("CONDITION_API_BASE_URL")
EPIC_PUBLIC_BASE_URL = os.getenv("EPIC_PUBLIC_BASE_URL", "https://projects.eao.gov.bc.ca")
EPIC_PUBLIC_SEARCH_PATH = os.getenv("EPIC_PUBLIC_SEARCH_PATH", "/api/public/search")
EPIC_PUBLIC_DOCUMENT_TYPE_IDS = os.getenv("EPIC_PUBLIC_DOCUMENT_TYPE_IDS", "")
EPIC_PUBLIC_DOCUMENT_TYPE_ID_MAP = os.getenv("EPIC_PUBLIC_DOCUMENT_TYPE_ID_MAP", "")
EPIC_PUBLIC_MAX_PAGES = os.getenv("EPIC_PUBLIC_MAX_PAGES", "")
EPIC_PUBLIC_MAX_DOCUMENTS = os.getenv("EPIC_PUBLIC_MAX_DOCUMENTS", "")
KEYCLOAK_BASE_URL = os.getenv('KEYCLOAK_BASE_URL')
KEYCLOAK_REALM_NAME = os.getenv('KEYCLOAK_REALM_NAME', 'eao-epic')
SERVICE_ACCOUNT_ID = os.getenv('SERVICE_ACCOUNT_ID')
Expand Down
62 changes: 34 additions & 28 deletions jobs/epic-cron/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,58 +1,64 @@
Flask-Caching==2.3.1
Flask-Mail==0.10.0
Flask-Moment==1.0.6
Flask-SQLAlchemy==3.1.1
Flask==3.1.3
Jinja2==3.1.6
MarkupSafe==3.0.3
PyJWT==2.12.0
SQLAlchemy-Continuum==1.6.0
SQLAlchemy-Utils==0.42.1
SQLAlchemy==2.0.48
Werkzeug==3.1.6
aniso8601==10.0.1
attrs==25.4.0
attrs==26.1.0
beautifulsoup4==4.13.3
blinker==1.9.0
cachelib==0.13.0
certifi==2026.2.25
cffi==2.0.0
charset-normalizer==3.4.5
charset-normalizer==3.4.7
clamd==1.0.2
click==8.3.1
cryptography==46.0.5
flake8_import_order==0.19.2
click==8.3.2
ecdsa==0.19.2
Flask-Caching==2.3.1
flask-cors==6.0.2
flask-jwt-oidc==0.7.0
flask-marshmallow==1.2.1
Flask-Migrate==4.1.0
Flask-Mail==0.10.0
flask-marshmallow==1.4.0
Flask-Moment==1.0.6
flask-restx==1.3.2
gunicorn==25.1.0
Flask-SQLAlchemy==3.1.1
Flask==3.1.3
fiona==1.10.1
geopandas==1.1.3
gunicorn==25.3.0
idna==3.11
importlib_resources==6.5.2
itsdangerous==2.2.0
Jinja2==3.1.6
jsonschema-specifications==2025.9.1
jsonschema==4.26.0
lxml==5.1.0
MarkupSafe==3.0.3
marshmallow-enum==1.5.1
marshmallow-sqlalchemy==1.0.0
marshmallow==3.18.0
openpyxl==3.1.5
packaging==26.0
pandas==2.3.1
psycopg2-binary==2.9.11
pycodestyle==2.14.0
pycparser==3.0
pyflakes==3.4.0
pyasn1==0.6.3
pycryptodome==3.20.0
pyhumps==3.8.0
pyproj==3.7.2
python-docx==1.1.2
python-dotenv==1.2.2
python-jose==3.5.0
pytz==2026.1.post1
referencing==0.37.0
requests==2.32.5
requests==2.33.1
rpds-py==0.30.0
rsa==4.9.1
secure==1.0.1
setuptools==82.0.1
shapely==2.1.2
six==1.17.0
tomli==2.4.0
SQLAlchemy-Continuum==1.6.0
SQLAlchemy-Utils==0.42.1
SQLAlchemy==2.0.49
tenacity==9.0.0
typing_extensions==4.15.0
urllib3==2.6.3
zimports==0.6.3
Werkzeug==3.1.8
-e git+https://github.com/bcgov/EPIC.submit.git@develop#egg=submit-api&subdirectory=submit-api
#-e git+https://github.com/bcgov/EPIC.track.git@develop#egg=api&subdirectory=epictrack-api
-e git+https://github.com/bcgov/EPIC.compliance.git@develop#egg=compliance-api&subdirectory=compliance-api
-e git+https://github.com/bcgov/EPIC.conditions.git@main#egg=condition-api&subdirectory=condition-api
-e git+https://github.com/bcgov/EPIC.conditions.git@main#egg=condition-api&subdirectory=condition-api
16 changes: 14 additions & 2 deletions jobs/epic-cron/requirements/prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Flask-Moment
Flask-SQLAlchemy
SQLAlchemy-Continuum
flask-restx
flask-marshmallow==1.2.1
flask-marshmallow==1.4.0
flask-jwt-oidc==0.7.0
python-dotenv
psycopg2-binary
Expand All @@ -20,10 +20,22 @@ sqlalchemy-utils
Flask-Caching
sqlalchemy
secure
Flask-Migrate
geopandas
fiona
pyproj
shapely
beautifulsoup4==4.13.3
lxml==5.1.0
openpyxl==3.1.5
pandas==2.3.1
pycryptodome==3.20.0
python-docx==1.1.2
tenacity==9.0.0
python-dotenv
requests
flask_cors
pyhumps
importlib-resources
clamd
pytz
pytz
15 changes: 13 additions & 2 deletions jobs/epic-cron/sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,28 @@ CONDITION_API_BASE_URL=http://localhost:5000
# Base URL for the BC EPIC Public API used to fetch published documents
EPIC_PUBLIC_BASE_URL=https://projects.eao.gov.bc.ca

# EPIC Public Search Path
# Override only if the deployment exposes search on a non-default route.
EPIC_PUBLIC_SEARCH_PATH=/api/public/search

# EPIC Public Document Type IDs (comma-separated)
# Filters document fetching to specific EPIC document types.
# Leave unset to use the keys from EPIC_PUBLIC_DOCUMENT_TYPE_ID_MAP (or the built-in defaults).
# Leave unset to use the keys from EPIC_PUBLIC_DOCUMENT_TYPE_ID_MAP.
# If both this value and the map below are empty, the extractor fetches all published PROJECT documents.
EPIC_PUBLIC_DOCUMENT_TYPE_IDS=

# EPIC Public Document Type ID Map (comma-separated epicId:conditionTypeId pairs)
# Maps EPIC Public type IDs to condition repo document_type_id values.
# Leave unset to use the built-in defaults in EpicPublicService.DEFAULT_DOCUMENT_TYPE_ID_MAP.
# Leave unset to skip type-specific mapping and use the default condition document type ID.
# Example: 5cf00c03a266b7e1877504d1:3
EPIC_PUBLIC_DOCUMENT_TYPE_ID_MAP=

# EPIC Public Local Debug Limits
# Leave unset in normal/prod runs.
# Set these locally to reduce the number of API calls and documents processed.
EPIC_PUBLIC_MAX_PAGES=
EPIC_PUBLIC_MAX_DOCUMENTS=

# ------------------------------------------------------------------------------
# KEYCLOAK AUTHENTICATION
# ------------------------------------------------------------------------------
Expand Down
Loading
Loading