Fork me on GitHub
#circleci
<
2023-04-26
>
vemv19:04:17

How does one use https://circleci.com/developer/images/image/cimg/postgres again? My .circleci looks like this:

test:
    docker:
      - image: cimg/clojure:1.11.1
      - image: cimg/postgres:15.2
    working_directory: ~/repo
    steps:
      - checkout
      - run:
          command: createdb foobar
which then fails with
createdb: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
	Is the server running locally and accepting connections on that socket?

Exited with code exit status 1

vemv19:04:23

I copied the environment from https://github.com/thoughtbot/administrate/blob/3a9d52ddf7e638b07884712a87dcde0374e4793b/.circleci/config.yml and refrained from using createdb directly. Works!