2
0
mirror of https://github.com/offen/website.git synced 2024-12-23 05:20:21 +01:00

add initial postgres database connector

This commit is contained in:
Frederik Ring 2019-04-12 09:04:31 +02:00
parent 0f731831f7
commit 8b580b787f
2 changed files with 14 additions and 0 deletions

View File

@ -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:

View File

@ -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