Skip to content

Commit

Permalink
Add docker (#8)
Browse files Browse the repository at this point in the history
* added initial docker setup

* update dockerfile

* moved docker to top-level folder

* copy code

* update docker

* update readme

* update poetry
  • Loading branch information
cehbrecht authored Dec 4, 2024
1 parent 00f93ca commit 1e575dc
Show file tree
Hide file tree
Showing 6 changed files with 198 additions and 162 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.git
docs/
site/
notebooks/
tests/
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM geopython/pygeoapi:latest

LABEL maintainer="Carsten Ehbrecht <[email protected]>"

# Volume mapping cannot be used with webhook
# https://github.com/maccyber/micro-dockerhub-hook
# simply copy config into Image.
COPY pygeoapi-config.yml /pygeoapi/local.config.yml
# ADD ./data /pygeoapi/data
# Should now be in pygeoapi Docker Image

# COPY ./demo.pygeoapi.io.cron /etc/cron.d/demo.pygeoapi.io.cron

# Set the working directory to /code
WORKDIR /code

# Copy source code
COPY . /code

# Install
# RUN pip3 install poetry
# RUN poetry install
RUN python3 -m pip install --no-cache-dir -e .
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,20 @@ make docs

See usage examples for the processes in the notebooks folder.

## Docker

You can also use a docker deployment.

Build images:
```bash
docker-compose build
```

Start container:
```bash
docker-compose up
```

## License

This project is licensed under the Apache License version 2.
Expand Down
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3'
services:
pygeoapi:
build: .
image: birdhouse/nandu
ports:
- "5000:80"

# docker-compose build
# docker-compose up
# docker-compose down
# docker-compose rm
Loading

0 comments on commit 1e575dc

Please sign in to comment.