diff --git a/.github/workflows/build-docker-image.yaml b/.github/workflows/build-docker-image.yaml index accac4ea..a0dff9ca 100644 --- a/.github/workflows/build-docker-image.yaml +++ b/.github/workflows/build-docker-image.yaml @@ -6,14 +6,14 @@ on: branches: - 'main' paths: - - 'Dockerfile' + - 'docker/runner/Dockerfile' tags: - 'v*' pull_request: branches: - 'main' paths: - - 'Dockerfile' + - 'docker/runner/Dockerfile' env: REGISTRY: ghcr.io @@ -46,7 +46,7 @@ jobs: - name: Build and push Docker image uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 with: - context: . + context: docker/runner push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/README.md b/README.md index cf0d8e5c..97cb5b17 100644 --- a/README.md +++ b/README.md @@ -16,69 +16,71 @@ See the [Documentation](https://smnorris.github.io/bcfishpass/) for details. ## General requirements - bash -- GDAL (tested with v3.6) -- a PostgreSQL / PostGIS database (tested with v14/v3.3) -- Python (tested with v3.11.0) +- GDAL +- PostgreSQL / PostGIS +- Python - [bcdata](https://github.com/smnorris/bcdata) - [fwapg](https://github.com/smnorris/fwapg) - [bcfishobs](https://github.com/smnorris/bcfishobs) -## Setup / Usage +## Development setup `bcfishpass` is a collection of shell/sql/Python scripts. To download and use the latest: git clone https://github.com/smnorris/bcfishpass.git cd bcfishpass -Install required tools using your preferred method. For local development, `conda` can be simplest: +All scripts presume the path to an existing PostGIS enabled database is defined by the environment variable `$DATABASE_URL`: - conda env create -f environment.yml - conda activate bcfishpass + export DATABASE_URL=postgresql://postgres@localhost:5432/bcfishpass -A Docker image is also provided: +Install all other required tools/dependencies using your preferred package manager or via Docker. +A `conda` environment and a `Dockerfile` are provided: - docker pull ghcr.io/smnorris/bcfishpass:main +#### Conda -If the database you are working with does not already exist, create it: + conda env create -f environment.yml + conda activate bcfishpass + jobs/