Skip to content

Commit

Permalink
improve docker compose caching
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddewie committed Mar 30, 2024
1 parent 6f20960 commit 82d3ba0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ services:
build:
context: .
dockerfile: import.Dockerfile
cache_from:
- ghcr.io/hiddewie/openrailwaymap-import:latest
depends_on:
- db
volumes:
Expand Down

0 comments on commit 82d3ba0

Please sign in to comment.