Skip to content

Commit

Permalink
Adding docker-compose (#2)
Browse files Browse the repository at this point in the history
* fix .travis.yml

* adding docker-compose

* renamed .docker to deploy/docker-compose
  • Loading branch information
kcajmagic authored Jan 16, 2019
1 parent a77236b commit 13f7f84
Show file tree
Hide file tree
Showing 5 changed files with 156 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
go_import_path: github.com/comcast/viper


language: go

go:
Expand Down
9 changes: 9 additions & 0 deletions deploy/docker-compose/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Docker Compose

```bash
# build the images svalinn or gungnir
# or pull kcajmagic/gungnir-dev:latest and kcajmagic/svalinn-dev:latest
# and retag it

docker-compose up -d
```
36 changes: 36 additions & 0 deletions deploy/docker-compose/docFiles/gungnir.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
primary:
address: ":7000"
health:
address: ":7001"
options:
- "PayloadsOverZero"
- "PayloadsOverHundred"
- "PayloadsOverThousand"
- "PayloadsOverTenThousand"
readTimeout: "15s"
idleTimeout: "15s"
pprof:
address: ":7002"
readTimeout: "15s"
idleTimeout: "15s"
metric:
address: ":7003"
metricsOptions:
namespace: "webpa"
subsystem: "tr1d1um"
readTimeout: "15s"
idleTimeout: "15s"
log:
file: "stdout"
level: "INFO"
json: true

authHeader: ["YXV0aEhlYWRlcg=="]

db:
server: "db:11210"
bucket: "devices"
username: "Administrator"
password: "somepassword"
numRetries: 4
46 changes: 46 additions & 0 deletions deploy/docker-compose/docFiles/svalinn.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
primary:
address: ":7100"
health:
address: ":7101"
options:
- "PayloadsOverZero"
- "PayloadsOverHundred"
- "PayloadsOverThousand"
- "PayloadsOverTenThousand"
readTimeout: "15s"
idleTimeout: "15s"
pprof:
address: ":7102"
readTimeout: "15s"
idleTimeout: "15s"
metric:
address: ":7103"
metricsOptions:
namespace: "webpa"
subsystem: "tr1d1um"
readTimeout: "15s"
idleTimeout: "15s"
log:
file: "stdout"
level: "INFO"
json: true

config:
endpoint: "/device-status"
queueSize: 3000
db:
server: "db:11210"
username: "Administrator"
password: "somepassword"
bucket: "devices"
numRetries: 4

authHeader: ["YXV0aEhlYWRlcg=="]

webhook:
secret: "Basic YXV0aEhlYWRlcg=="
registrationInterval: "4m"
url: "http://host.docker.internal:8181/api/v1/device-status"
timeout: "1m"
registrationURL: "http://127.0.0.1:6000/hook"
65 changes: 65 additions & 0 deletions deploy/docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
version: '3.4'

services:
gungnir:
image: gungnir:local
container_name: gungnir
hostname: gungnir
restart: on-failure
ports:
- 7000:7000
- 7001:7001
- 7002:7002
- 7003:7003
volumes:
- ./docFiles/gungnir.yaml:/etc/gungnir/gungnir.yaml
networks:
- back-tier
depends_on:
- db

svalinn:
image: svalinn:local
container_name: svalinn
hostname: svalinn
restart: on-failure
ports:
- 7100:7100
- 7101:7101
- 7102:7102
- 7103:7103
volumes:
- ./docFiles/svalinn.yaml:/etc/svalinn/svalinn.yaml
networks:
- back-tier
depends_on:
- db

db:
image: bentonam/couchbase-docker:community
container_name: db
hostname: db
ports:
- 8091:8091
- 8092:8092
- 8093:8093
- 8094:8094
- 11210:11210
environment:
CLUSTER_USERNAME: Administrator
CLUSTER_PASSWORD: somepassword
CLUSTER_NAME: My Couchbase Cluster
SERVICES: data,index,query,fts
CLUSTER_RAMSIZE: 500
BUCKET: devices
BUCKET_RAMSIZE: 300
NODE_INIT_INDEX_PATH: /opt/couchbase/var/lib/couchbase/indexes
RBAC_USERNAME: devices
RBAC_PASSWORD: password123
RBAC_PASSWORD: bucket_full_access[devices]
ENABLE_FLUSH: 1
networks:
- back-tier

networks:
back-tier:

0 comments on commit 13f7f84

Please sign in to comment.