diff --git a/.circleci/config.yml b/.circleci/config.yml index 8edaa05..8ccaaa1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,6 +4,12 @@ jobs: server: docker: - image: circleci/golang:1.12 + environment: + - POSTGRES_CONNECTION_STRING=postgres://circle:test@localhost:5432/circle_test?sslmode=disable + - image: circleci/postgres:11.2-alpine + environment: + - POSTGRES_USER=circle + - POSTGRES_PASSWORD=test working_directory: ~/offen/server steps: - checkout: diff --git a/docker-compose.yml b/docker-compose.yml index 04c45f3..d171cf4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,6 +6,14 @@ server: - $GOPATH/pkg/mod:/go/pkg/mod environment: - GOPATH=/go + - POSTGRES_CONNECTION_STRING=postgres://postgres:develop@database:5432/postgres?sslmode=disable ports: - 8080:8080 command: go run cmd/server/main.go + links: + - database + +database: + image: postgres:11.2 + environment: + - POSTGRES_PASSWORD=develop