EnviDat / nasa-gcmd

Code to make EnviDat data accessible via NASA Earthdata scrapers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nasa-gcmd

Code to make EnviDat data accessible via NASA Earthdata scrapers.

  • Builds a Python image with all necessary requirements.
  • Adds the main.py file to the image.
  • Executes main.py at image startup.

Development

  • Build the debug image: docker compose build

  • Create .env.secret:

    LOG_LEVEL=DEBUG
    API_URL=xxx
    AWS_ENDPOINT=xxx
    AWS_REGION=xxx
    AWS_ACCESS_KEY=xxx
    AWS_SECRET_KEY=xxx
  • Run via VSCode debug menu.

2a. Local Debug

  • Install pdm and enable pep582 support pdm --pep582.
  • Install project dependencies pdm install
  • Run with IDE debugger

2b. Remote Debug

  • Build the debug image: docker compose build
  • Start the container: docker compose up -d
  • Run remote debugging via IDE (VSCode) debug menu.

Production

  • Create the required secrets in the cron namespace.
  • Push the latest code.
  • Watch the build pipeline run in Gitlab.
  • Cronjob from the k8s-cron repo runs on schedule, using built image.

About

Code to make EnviDat data accessible via NASA Earthdata scrapers.


Languages

Language:Dockerfile 68.2%Language:Python 31.8%