Skip to content

Commit

Permalink
Merge pull request #40 from govlt/setup-image
Browse files Browse the repository at this point in the history
setup image
  • Loading branch information
ambrazasp authored Oct 8, 2024
2 parents 5a29048 + 3c1c75f commit 19c08da
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/publish-pmtiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,38 @@ jobs:
pmtiles/parcels.pmtiles
data-source-checksums.txt
publish-boundaries-vector-docker-image:
name: Vector docker image build and push
runs-on: ubuntu-latest
timeout-minutes: 30
needs:
- generate-geopackage
- generate-pmtiles
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
name: pmtiles
path: vector/docker/static/tiles
merge-multiple: true

- name: Build & tag docker image
uses: AplinkosMinisterija/reusable-workflows/.github/actions/docker-build-tag-push@main
with:
docker-image: ghcr.io/govlt/national-boundaries-vector
docker-context: vector/docker/static
file: vector/docker/static/Dockerfile
environment: ${{ (startsWith(github.ref, 'refs/tags/') && !contains(github.ref, 'pre')) && 'stable' || 'preview' }}
no-cache: true
push: true
cache-from: ''
cache-to: ''

publish-page:
name: Publish page
runs-on: ubuntu-latest
Expand Down
11 changes: 11 additions & 0 deletions vector/docker/static/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM caddy:2.8

EXPOSE 80

HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 CMD wget -qO- http://127.0.0.1:80/health || exit 1

# Copy Caddyfile
COPY ./caddy/Caddyfile /etc/caddy/Caddyfile

# Copy built files from the build stage
COPY ./tiles /srv/
27 changes: 27 additions & 0 deletions vector/docker/static/caddy/Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
auto_https off

servers {
trusted_proxies static private_ranges
}
}

:80

root * /srv

handle /health {
log_skip
@goingDown vars {http.shutting_down} true
respond @goingDown "Bye-bye in {http.time_until_shutdown}" 503
respond "OK"
}

try_files {path} {file}
file_server

header -Server

handle_errors {
header -Server
}

0 comments on commit 19c08da

Please sign in to comment.