I'm struggling to configure the MAX_CONNECTIONS
postgres config in my circleCI configuration file. As you can see below I tried using sed
to replace the max_connections value, but this didn't do anything, the max_connections remained at the default 100
. I also tried to run a custom command (see the commented command: |
block below), but this threw the following error and stopped the circleCI process: /docker-entrypoint.sh: line 100: exec: docker: not found Exited with code 127
version: 2
jobs:
test:
pre:
- sudo sed -i 's/max_connections = 100/max_connections = 300/g' /etc/postgresql/9.6/main/postgresql.conf # Allow more than 100 connections to DB
- sudo service postgresql restart
docker:
# Specify the version you desire here
- image: circleci/node:8.11
# Setup postgres and configure the db
- image: hegand/postgres-postgis
# command: |
# docker run --name hegand/postgres-postgis -e POSTGRES_PORT=$POSTGRES_PORT POSTGRES_PASSWORD=$POSTGRES_PASSWORD POSTGRES_DB=$POSTGRES_DB -d postgres -N 300
environment:
POSTGRES_USER: user
POSTGRES_DB: table
POSTGRES_PASSWORD: ""
POSTGRES_PORT: 5432