From 47e52f048e1f3098de2c2e1807463b4e6ea1bcf2 Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Sun, 12 Jan 2025 17:00:06 +0100 Subject: [PATCH] build import, remove DB image --- .github/workflows/deploy.yml | 25 ++++++++++++++++++++++++- docker-compose.yml | 1 - 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6dcfbfde..e116bc56 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -30,8 +30,27 @@ jobs: run: | flyctl deploy --config proxy.fly.toml --local-only + build-import: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build and push + uses: docker/build-push-action@v6 + with: + push: true + tags: ghcr.io/hiddewie/openrailwaymap-import:latest + cache-from: type=gha + cache-to: type=gha,mode=max + generate-tiles: name: Generate tiles + needs: build-import runs-on: ubuntu-latest strategy: @@ -116,9 +135,13 @@ jobs: docker cp "$CONTAINER_ID:/data/data.osm.pbf" data/data.osm.pbf docker container rm "$CONTAINER_ID" + - name: Build and start database + run: | + docker compose up --build db + - name: Import data run: | - docker compose run --build import import + docker compose run import import - name: Generate tiles env: diff --git a/docker-compose.yml b/docker-compose.yml index 777364dc..d7fea958 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,5 @@ services: db: - image: ghcr.io/hiddewie/openrailwaymap-import-db:latest build: context: db command: |