-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from digitalearthpacific/add-docker-stuff
Add test configuration and docker compose plus github action
- Loading branch information
Showing
8 changed files
with
270 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name : Push Docker Image | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
# Todo: Set up smoke test | ||
# test: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
|
||
push: | ||
permissions: write-all | ||
if: github.ref == 'refs/heads/main' || github.event_name == 'release' | ||
# needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Get version number for tagging the image | ||
id: get_version | ||
run: | | ||
git fetch --all --tags | ||
echo "VERSION=$(git describe --tags)" >> $GITHUB_OUTPUT | ||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.get_version.outputs.VERSION }},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM maptiler/tileserver-gl | ||
|
||
ADD config.json styles.json /data/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
data/coastlines_0-7-0-54.gpkg: | ||
wget https://deppcpublicstorage.blob.core.windows.net/output/dep_ls_coastlines/dep_ls_coastlines_0-7-0-54.gpkg \ | ||
-O data/dep_ls_coastlines_0-7-0-54.gpkg | ||
|
||
data/coastlines_0-7-0-54.pmtiles: | ||
wget https://deppcpublicstorage.blob.core.windows.net/output/dep_ls_coastlines/dep_ls_coastlines_0-7-0-54.pmtiles \ | ||
-O data/dep_ls_coastlines_0-7-0-54.pmtiles | ||
|
||
download: | ||
make data/coastlines_0-7-0-54.gpkg | ||
make data/coastlines_0-7-0-54.pmtiles | ||
|
||
upload: | ||
aws s3 sync \ | ||
data/ \ | ||
s3://dep-public-prod/dep_ls_coastlines/ \ | ||
|
||
up: | ||
docker-compose up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,33 @@ | ||
{ | ||
"paths": { | ||
"glyphs": "https://demotiles.maplibre.org/font/{fontstack}/{range}.pbf" | ||
"options": { | ||
"domains": [ | ||
"prod.digitalearthpacific.org", | ||
"localhost:8080", | ||
"127.0.0.1:8080" | ||
], | ||
"formatQuality": { | ||
"jpeg": 80, | ||
"webp": 90 | ||
}, | ||
"maxScaleFactor": 3, | ||
"maxSize": 2048, | ||
"pbfAlias": "pbf", | ||
"serveAllFonts": false, | ||
"serveAllStyles": false, | ||
"serveStaticMaps": true, | ||
"allowRemoteMarkerIcons": true, | ||
"allowInlineMarkerImages": true, | ||
"staticAttributionText": "© Digital Earth Pacific", | ||
"tileMargin": 0 | ||
}, | ||
"styles": { "coastlines_style": { "style": "styles.json" } } | ||
} | ||
"styles": { | ||
"coastlines": { | ||
"style": "styles.json" | ||
} | ||
}, | ||
"data": { | ||
"coastlines": { | ||
"pmtiles": "https://deppcpublicstorage.blob.core.windows.net/output/dep_ls_coastlines/dep_ls_coastlines_0-7-0-54.pmtiles" | ||
} | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
services: | ||
tileserver: | ||
image: maptiler/tileserver-gl | ||
volumes: | ||
- ./config.json:/data/config.json | ||
- ./styles.json:/data/styles.json | ||
ports: | ||
- 8080:8080 | ||
command: | ||
- "--config" | ||
- "/data/config.json" |
Oops, something went wrong.