Skip to content

Commit

Permalink
use custom docker build to set max_locks_per_transaction for postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardchalstrey1 committed Feb 15, 2024
1 parent 193155c commit 5812cb3
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/test_docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Build docker image for testing code

on:
push:
branches: [dev]
pull_request:
branches: [dev]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: docker.pkg.github.com/edwardchalstrey1/seshat/tests-image:latest
11 changes: 6 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
name: Test code

# Triggers the workflow on push or pull request to dev branch, see test_docker.yml
on:
push:
branches: [dev]
pull_request:
branches: [dev]
workflow_run:
workflows: ["Build docker image for testing code"]
types:
- completed

jobs:
test_core:
Expand All @@ -16,7 +17,7 @@ jobs:
runs-on: ${{ matrix.os }}
services:
postgres:
image: postgis/postgis
image: docker.pkg.github.com/edwardchalstrey1/seshat/tests-image:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM postgis/postgis
RUN echo "max_locks_per_transaction = 256" >> /var/lib/postgresql/data/postgresql.conf

0 comments on commit 5812cb3

Please sign in to comment.