Skip to content

Configuring Postgres Service Container #106564

Answered by ghost
ml-sherpa asked this question in Actions
Discussion options

You must be logged in to vote

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.

  1. Now, please create a Dockerfile in your project directory:
FROM postgres:latest

# Set max_locks_per_transaction
RUN echo "max_locks_per_transaction = 1024" >> /etc/postgresql/postgresql.conf
  1. Build the Docker image:
docker build -t my-custom-postgres .
  1. Push the Docker image to a container registry accessible to your GitHub Actions workflow.

  2. In your GitHub Act…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ml-sherpa
Comment options

@jshields
Comment options

Answer selected by ml-sherpa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Question
2 participants