Open Infrastructure Map, a view of infrastructure data in OpenStreetMap
Add dockerfile and action for Tegola
Russ Garrett569197583d08
diff --git a/.github/workflows/tileserver.yml b/.github/workflows/tileserver.ymlnew file mode 100644index 0000000..0f78a88--- /dev/null+++ b/.github/workflows/tileserver.yml@@ -0,0 +1,33 @@+name: Build tile server container++on:+ push:+ branches:+ - main+ paths:+ - 'tegola/**'+ - '.github/workflows/tegola.yml'++jobs:+ build:+ env:+ IMAGE: ghcr.io/openinframap/tileserver+ runs-on: ubuntu-latest+ steps:+ - name: Checkout+ uses: actions/checkout@v3+ - name: Login to GitHub Container Registry+ uses: docker/login-action@v2+ with:+ registry: ghcr.io+ username: ${{ github.actor }}+ password: ${{ secrets.GITHUB_TOKEN }}+ - name: Build and push+ id: docker_build+ uses: docker/build-push-action@v4+ with:+ context: ./tegola+ file: ./tegola/Dockerfile+ push: true+ tags: |+ ${{ env.IMAGE }}:${{ github.sha }}-${{ github.run_number }}\ No newline at end of filediff --git a/tegola/Dockerfile b/tegola/Dockerfilenew file mode 100644index 0000000..4a79221--- /dev/null+++ b/tegola/Dockerfile@@ -0,0 +1,10 @@+FROM python:3.9-slim AS build+WORKDIR /app+COPY . .+RUN pip install PyYAML toml+RUN python generate_tegola_config.py ./tegola.yml ./layers.yml > ./config.toml++FROM gospatial/tegola:v0.16.0+COPY --from=build /app/config.toml /etc/tegola/config.toml++ENTRYPOINT ["/opt/tegola", "serve", "--config", "/etc/tegola/config.toml"]\ No newline at end of file