diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2986a114..cf985200 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -66,6 +66,10 @@ jobs: # run: | # curl --progress-bar http://ftp.snt.utwente.nl/pub/misc/openstreetmap/europe-latest.osm.pbf --output data/europe.osm.pbf + # The disk and memory in the Github runners is too small to do large imports. + # A Docker image with a pre-imported database state is used. + # During the deployment run, the docker image is updated through the replication updated, + # comitted to a new image and pushed for future used. - name: Pull import database run: | docker compose pull db @@ -98,7 +102,8 @@ jobs: - name: Generate tiles run: | docker compose up --no-build --pull never --detach db - docker compose up --build martin-cp + docker compose build martin-cp + docker compose run --no-build martin-cp - name: Deploy run: | diff --git a/docker-compose.yml b/docker-compose.yml index 1648aba8..26d92ae4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,6 +23,8 @@ services: build: context: . dockerfile: import.Dockerfile + cache_from: + - ghcr.io/hiddewie/openrailwaymap-import:latest depends_on: - db volumes: