-
Select Topic AreaQuestion BodyWhat's the best way to configure a postgres service container in github actions. Specifically I want to configure max_locks_per_transaction when the container starts.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi. Since environment variables and mounting volumes are not feasible options for you, one workaround could be to create a custom Docker image with the desired PostgreSQL configuration and then use that image in your GitHub Actions workflow. You can pre-configure the
FROM postgres:latest
# Set max_locks_per_transaction
RUN echo "max_locks_per_transaction = 1024" >> /etc/postgresql/postgresql.conf
docker build -t my-custom-postgres .
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: my-custom-postgres
ports:
- 5432:5432
options: --name postgresql
steps:
# Your steps here By using a custom Docker image with the desired PostgreSQL configuration, you can ensure that the |
Beta Was this translation helpful? Give feedback.
Hi. Since environment variables and mounting volumes are not feasible options for you, one workaround could be to create a custom Docker image with the desired PostgreSQL configuration and then use that image in your GitHub Actions workflow. You can pre-configure the
max_locks_per_transaction
setting in the Dockerfile itself.docker build -t my-custom-postgres .
Push the Docker image to a container registry accessible to your GitHub Actions workflow.
In your GitHub Act…