From 77244bb70f0e3efeb7d32910d413651d959c4a11 Mon Sep 17 00:00:00 2001 From: Naomi Lockhart Date: Thu, 25 May 2023 17:12:30 +0100 Subject: [PATCH] WIP --- .github/workflows/test.yml | 10 +++++++--- Dockerfile | 2 +- docker-compose.yml | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 31eef2a4b6..605d7baee5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,7 @@ on: [push] env: RAILS_ENV: test - DATABASE_URL: postgres://postgres:@localhost:5432 + DATABASE_URL: postgres://postgres:password@localhost:5432 jobs: tests: @@ -14,10 +14,10 @@ jobs: services: postgres: - image: postgres:11.6-alpine + image: postgis/postgis:11-3.3-alpine env: POSTGRES_USER: postgres - POSTGRES_PASSWORD: '' + POSTGRES_PASSWORD: 'password' ports: - 5432:5432 options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 @@ -44,6 +44,10 @@ jobs: restore-keys: | ${{ runner.os }}-gems- + - name: Install postgis extensions + run: | + sudo apt-get install libproj-dev proj-bin + - name: Install gems run: | bundle config path vendor/bundle diff --git a/Dockerfile b/Dockerfile index 5bc316acbc..83b9cba04e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN apk add --update --no-cache tzdata && \ # build-base: complication tools for bundle # yarn: node package manager # postgresql-dev: postgres driver and libraries -RUN apk add --no-cache build-base yarn postgresql-dev +RUN apk add --no-cache build-base yarn postgresql-dev postgis proj proj-dev # Install bundler to run bundle exec # This should be the same version as the Gemfile.lock diff --git a/docker-compose.yml b/docker-compose.yml index 3d392743de..5bc8bd286f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ volumes: services: db: - image: postgres:11-alpine + image: postgis/postgis:11-3.3-alpine restart: always # To preserve data between runs of docker-compose, we mount a folder from the host machine. volumes: