2
0
mirror of https://github.com/offen/website.git synced 2024-11-22 17:10:29 +01:00

Merge pull request #20 from offen/kms

Add KMS app
This commit is contained in:
Frederik Ring 2019-05-31 16:29:01 +02:00 committed by GitHub
commit 22e4d61a29
2 changed files with 101 additions and 57 deletions

View File

@ -1,6 +1,29 @@
version: 2 version: 2
jobs: jobs:
kms:
docker:
- image: circleci/golang:1.12
working_directory: ~/offen/kms
steps:
- checkout:
path: ~/offen
- restore_cache:
key: offen-kms-{{ checksum "go.mod" }}
- run:
name: Download modules
command: go mod download
- save_cache:
paths:
- /go/pkg/mod
key: offen-kms-{{ checksum "go.mod" }}
- run:
name: Generate one-off key file
command: make bootstrap
- run:
name: Run tests
command: make test-ci
server: server:
docker: docker:
- image: circleci/golang:1.12 - image: circleci/golang:1.12
@ -122,6 +145,7 @@ workflows:
build_and_test: build_and_test:
jobs: jobs:
- server - server
- kms
- vault - vault
- script - script
- auditorium - auditorium

View File

@ -1,3 +1,20 @@
version: '3'
services:
kms:
image: golang:1.12
working_dir: /kms
volumes:
- ./kms:/kms
- ./local.offen.dev.pem:/kms/local.offen.dev.pem
- ./local.offen.dev-key.pem:/kms/local.offen.dev-key.pem
- $GOPATH/pkg/mod:/go/pkg/mod
environment:
- GOPATH=/go
ports:
- 8081:8081
command: go run cmd/kms/main.go -port 8081
server: server:
image: golang:1.12 image: golang:1.12
working_dir: /server working_dir: /server
@ -9,11 +26,14 @@ server:
environment: environment:
- GOPATH=/go - GOPATH=/go
- POSTGRES_CONNECTION_STRING=postgres://postgres:develop@database:5432/postgres?sslmode=disable - POSTGRES_CONNECTION_STRING=postgres://postgres:develop@database:5432/postgres?sslmode=disable
- KMS_ENCRYPTION_ENDPOINT=http://kms:8081/encrypt
ports: ports:
- 8080:8080 - 8080:8080
command: go run cmd/server/main.go -origin https://local.offen.dev:9977 -conn postgres://postgres:develop@database:5432/postgres?sslmode=disable -key local.offen.dev-key.pem -cert local.offen.dev.pem command: go run cmd/server/main.go -origin https://local.offen.dev:9977 -conn postgres://postgres:develop@database:5432/postgres?sslmode=disable -key local.offen.dev-key.pem -cert local.offen.dev.pem -level debug
links: links:
- database - database
depends_on:
- kms
database: database:
image: postgres:11.2 image: postgres:11.2