mirror of
https://github.com/offen/website.git
synced 2024-11-22 09:00:28 +01:00
scaffold dummy KMS app
This commit is contained in:
parent
62ffd65f08
commit
3efb4187ac
@ -1,6 +1,26 @@
|
|||||||
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: Run tests
|
||||||
|
command: make test-ci
|
||||||
|
|
||||||
server:
|
server:
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/golang:1.12
|
- image: circleci/golang:1.12
|
||||||
@ -122,6 +142,7 @@ workflows:
|
|||||||
build_and_test:
|
build_and_test:
|
||||||
jobs:
|
jobs:
|
||||||
- server
|
- server
|
||||||
|
- kms
|
||||||
- vault
|
- vault
|
||||||
- script
|
- script
|
||||||
- auditorium
|
- auditorium
|
||||||
|
@ -1,61 +1,80 @@
|
|||||||
server:
|
version: '3'
|
||||||
image: golang:1.12
|
|
||||||
working_dir: /server
|
|
||||||
volumes:
|
|
||||||
- ./server:/server
|
|
||||||
- ./local.offen.dev.pem:/server/local.offen.dev.pem
|
|
||||||
- ./local.offen.dev-key.pem:/server/local.offen.dev-key.pem
|
|
||||||
- $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 -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
|
|
||||||
links:
|
|
||||||
- database
|
|
||||||
|
|
||||||
database:
|
services:
|
||||||
image: postgres:11.2
|
kms:
|
||||||
environment:
|
image: golang:1.12
|
||||||
- POSTGRES_PASSWORD=develop
|
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 -origin https://local.offen.dev:9977 -port 8081
|
||||||
|
|
||||||
vault:
|
server:
|
||||||
image: timbru31/node-chrome:slim
|
image: golang:1.12
|
||||||
working_dir: /offen/vault
|
working_dir: /server
|
||||||
volumes:
|
volumes:
|
||||||
- .:/offen
|
- ./server:/server
|
||||||
- ./local.offen.dev.pem:/offen/vault/local.offen.dev.pem
|
- ./local.offen.dev.pem:/server/local.offen.dev.pem
|
||||||
- ./local.offen.dev-key.pem:/offen/vault/local.offen.dev-key.pem
|
- ./local.offen.dev-key.pem:/server/local.offen.dev-key.pem
|
||||||
command: npm start -- --port 9977
|
- $GOPATH/pkg/mod:/go/pkg/mod
|
||||||
ports:
|
environment:
|
||||||
- 9977:9977
|
- GOPATH=/go
|
||||||
environment:
|
- POSTGRES_CONNECTION_STRING=postgres://postgres:develop@database:5432/postgres?sslmode=disable
|
||||||
- SERVER_HOST=https://local.offen.dev:8080
|
ports:
|
||||||
- AUDITORIUM_HOST=https://local.offen.dev:9955
|
- 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 -level debug
|
||||||
|
links:
|
||||||
|
- database
|
||||||
|
depends_on:
|
||||||
|
- kms
|
||||||
|
|
||||||
script:
|
database:
|
||||||
image: timbru31/node-chrome:slim
|
image: postgres:11.2
|
||||||
working_dir: /offen/script
|
environment:
|
||||||
volumes:
|
- POSTGRES_PASSWORD=develop
|
||||||
- .:/offen
|
|
||||||
- ./local.offen.dev.pem:/offen/script/local.offen.dev.pem
|
|
||||||
- ./local.offen.dev-key.pem:/offen/script/local.offen.dev-key.pem
|
|
||||||
command: npm start -- --port 9966
|
|
||||||
ports:
|
|
||||||
- 9966:9966
|
|
||||||
environment:
|
|
||||||
- VAULT_HOST=https://local.offen.dev:9977
|
|
||||||
|
|
||||||
auditorium:
|
vault:
|
||||||
image: timbru31/node-chrome:slim
|
image: timbru31/node-chrome:slim
|
||||||
working_dir: /offen/auditorium
|
working_dir: /offen/vault
|
||||||
volumes:
|
volumes:
|
||||||
- .:/offen
|
- .:/offen
|
||||||
- ./local.offen.dev.pem:/offen/auditorium/local.offen.dev.pem
|
- ./local.offen.dev.pem:/offen/vault/local.offen.dev.pem
|
||||||
- ./local.offen.dev-key.pem:/offen/auditorium/local.offen.dev-key.pem
|
- ./local.offen.dev-key.pem:/offen/vault/local.offen.dev-key.pem
|
||||||
command: npm start -- --port 9955
|
command: npm start -- --port 9977
|
||||||
ports:
|
ports:
|
||||||
- 9955:9955
|
- 9977:9977
|
||||||
environment:
|
environment:
|
||||||
- VAULT_HOST=https://local.offen.dev:9977
|
- SERVER_HOST=https://local.offen.dev:8080
|
||||||
|
- AUDITORIUM_HOST=https://local.offen.dev:9955
|
||||||
|
|
||||||
|
script:
|
||||||
|
image: timbru31/node-chrome:slim
|
||||||
|
working_dir: /offen/script
|
||||||
|
volumes:
|
||||||
|
- .:/offen
|
||||||
|
- ./local.offen.dev.pem:/offen/script/local.offen.dev.pem
|
||||||
|
- ./local.offen.dev-key.pem:/offen/script/local.offen.dev-key.pem
|
||||||
|
command: npm start -- --port 9966
|
||||||
|
ports:
|
||||||
|
- 9966:9966
|
||||||
|
environment:
|
||||||
|
- VAULT_HOST=https://local.offen.dev:9977
|
||||||
|
|
||||||
|
auditorium:
|
||||||
|
image: timbru31/node-chrome:slim
|
||||||
|
working_dir: /offen/auditorium
|
||||||
|
volumes:
|
||||||
|
- .:/offen
|
||||||
|
- ./local.offen.dev.pem:/offen/auditorium/local.offen.dev.pem
|
||||||
|
- ./local.offen.dev-key.pem:/offen/auditorium/local.offen.dev-key.pem
|
||||||
|
command: npm start -- --port 9955
|
||||||
|
ports:
|
||||||
|
- 9955:9955
|
||||||
|
environment:
|
||||||
|
- VAULT_HOST=https://local.offen.dev:9977
|
||||||
|
Loading…
Reference in New Issue
Block a user