Fork me on GitHub
#circleci
<
2021-01-01
>
slipset14:01:42

Trying to get a postgres (with jdbc.next) app building on circle. Got this:

docker:
      - image: circleci/clojure:openjdk-11-lein-2.8.1
      - image: circleci/postgres:13.1
        environment:
          POSTGRES_HOST_AUTH_METHOD: trust
          POSTGRES_USER: root
          POSTGRES_DB: circle-test_test
So the first line in the environment: is working, since I’m now able to start up the postgres image, but the two next ones don’t seem to have an impact. In my get-datasource call, I have
(jdbc/get-datasource {:dbtype "postgresql" :dbname "circle-test_test" :user "root"})
but circle still doesn’t let me connect.

borkdude14:01:39

@slipset do you use this for testing?

slipset14:01:40

I’m looking into migrating to postgres, and I want our tests to run on circle.

slipset14:01:54

Hay, that seems to have worked!

borkdude14:01:18

@slipset fwiw, there's also nice testing libs for that without having to install pg: https://github.com/seancorfield/next-jdbc/blob/develop/deps.edn#L23-L25

slipset14:01:52

Thanks! I’ll have a look into that.

borkdude14:01:32

The #sql channel is usually also helpful here

seancorfield17:01:33

Re: embedded PG -- I was amazed at how well that works!