mirror of
https://github.com/offen/website.git
synced 2024-11-22 09:00:28 +01:00
add initial postgres database connector
This commit is contained in:
parent
0f731831f7
commit
8b580b787f
@ -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:
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user