From db9069ccff39378b9021016cacaf2d4a9849b959 Mon Sep 17 00:00:00 2001 From: UnicodingUnicorn <7555ic@gmail.com> Date: Mon, 18 Feb 2019 03:27:42 +0800 Subject: [PATCH] Dockerise everything --- backend-bite | 2 +- backend-core | 2 +- backend-heartbeat | 2 +- backend-login | 2 +- backend-publish | 2 +- backend-store | 2 +- backend-subscribe | 2 +- backend-transcription | 2 +- docker-compose.yml | 94 ++++++++++++++++++++++++++++++++++++++++++- 9 files changed, 101 insertions(+), 9 deletions(-) diff --git a/backend-bite b/backend-bite index 60530cd..f9b278f 160000 --- a/backend-bite +++ b/backend-bite @@ -1 +1 @@ -Subproject commit 60530cdc3324693e2c83fccb5338dd2162fb0623 +Subproject commit f9b278f18cac8a8991699ab56d3f82f46989cf65 diff --git a/backend-core b/backend-core index 4db8c52..1904525 160000 --- a/backend-core +++ b/backend-core @@ -1 +1 @@ -Subproject commit 4db8c522371dde314378c5d5a631a11b90200afd +Subproject commit 1904525ebff34c17a6b1f4999c541fb3bf343517 diff --git a/backend-heartbeat b/backend-heartbeat index eafcfec..84d9ed7 160000 --- a/backend-heartbeat +++ b/backend-heartbeat @@ -1 +1 @@ -Subproject commit eafcfec1633b39304e1bade2ca14d81aef9dfd96 +Subproject commit 84d9ed7c06d086bdf87e7c153644bf1c9849ac34 diff --git a/backend-login b/backend-login index 549cce3..f54300a 160000 --- a/backend-login +++ b/backend-login @@ -1 +1 @@ -Subproject commit 549cce375671be7ea7c91d8cd1793a4b27c17281 +Subproject commit f54300aaea265c5076b7fcbed47d4a7fe5b24f19 diff --git a/backend-publish b/backend-publish index c1c69a0..18f2072 160000 --- a/backend-publish +++ b/backend-publish @@ -1 +1 @@ -Subproject commit c1c69a05efe679b34eeb40de5d6bc9aed60cd6f5 +Subproject commit 18f2072747e0d4cc6ab56061717f8573f2db3154 diff --git a/backend-store b/backend-store index 7886168..f897b74 160000 --- a/backend-store +++ b/backend-store @@ -1 +1 @@ -Subproject commit 7886168592fb591a88891d06533fcf79693f9650 +Subproject commit f897b74878050613330f2172af486ff4033e4ecd diff --git a/backend-subscribe b/backend-subscribe index eaf5063..a5dccb1 160000 --- a/backend-subscribe +++ b/backend-subscribe @@ -1 +1 @@ -Subproject commit eaf5063dafee5f276abe96c2a3851f8fde2e7b3d +Subproject commit a5dccb1210fef27395b73eee181295b5de17bd05 diff --git a/backend-transcription b/backend-transcription index 2d52846..8bcce30 160000 --- a/backend-transcription +++ b/backend-transcription @@ -1 +1 @@ -Subproject commit 2d528463d2db99905d557d708bbf1498c293d67c +Subproject commit 8bcce305788a0058b3b2f7b0ad932d7ab5761285 diff --git a/docker-compose.yml b/docker-compose.yml index adea560..ec4b59c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,22 +19,114 @@ services: networks: - natsnet + redis: + image: redis:latest + ports: + - "6379:6379" # Close this for production + networks: + - redisnet + core: build: ./backend-core + tty: true restart: unless-stopped - command: -listen :10200 -postgres postgresql://root@pg:5432/core?sslmode=disable + depends_on: + - pg ports: - "10200:10200" networks: - pgnet + command: -listen :10200 -postgres postgresql://root@pg:5432/core?sslmode=disable signal: build: ./backend-signal + tty: true restart: unless-stopped environment: - PORT=10201 ports: - "10201:10201" + + heartbeat: + build: ./backend-heartbeat + tty: true + restart: unless-stopped + depends_on: + - redis + ports: + - "10203:10203" + networks: + - redisnet + command: -listen :10203 -redis redis:6379 + + login: + build: ./backend-login + tty: true + restart: unless-stopped + ports: + - "10204:10204" + command: -listen :10204 -secret secret + + # Pipeline + bite: + build: ./backend-bite + tty: true + restart: unless-stopped + depends_on: + - nats + ports: + - "10202:10202" + networks: + - natsnet + command: -listen :10202 -nats nats://nats:4222 + + publish: + build: ./backend-publish + tty: true + restart: unless-stopped + depends_on: + - nats + ports: + - "10205:10205" + networks: + - natsnet + command: -listen :10205 -nats nats://nats:4222 -secret secret + + store: + build: ./backend-store + tty: true + restart: unless-stopped + depends_on: + - nats + networks: + - natsnet + command: -nats nats://nats:4222 -dbpath /tmp/badger + + subscribe: + build: ./backend-subscribe + tty: true + restart: unless-stopped + depends_on: + - nats + ports: + - "10206:10206" + networks: + - natsnet + command: -listen :10206 -nats nats://nats:4222 + + transcription: + build: ./backend-transcription + tty: true + restart: unless-stopped + depends_on: + - nats + ports: + - "10207:10207" + networks: + - natsnet + command: -listen :10207 -nats nats://nats:4222 -api-key AIzaSyDxSXDefzw9gXCQaVzOCYlRn_vcC9Da9Q0 + networks: pgnet: natsnet: + redisnet: