Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Lockyy committed May 25, 2023
1 parent 9bd4de7 commit 77244bb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 77244bb

Please sign in to comment.