This repository has been archived by the owner on Mar 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
docker-compose.yaml
39 lines (35 loc) · 1.78 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
version: "3.2"
services:
#------------------------------------------------------------------------
# Cloudstate proxy provides to the services implemented in "user-function"
# - state management
# - entrypoint for external access
# Each proxy is paired to a "user-function" and both should be within a same network namespace
#------------------------------------------------------------------------
cloudstate-proxy-friends:
image: cloudstateio/cloudstate-proxy-dev-mode:0.5.1
environment:
USER_FUNCTION_PORT: 8080
ports: ["9001:9000"] # map the container (Cloudstate proxy) port 9000 to port 9001 on the host
cloudstate-proxy-presence:
image: cloudstateio/cloudstate-proxy-dev-mode:0.5.1
environment:
USER_FUNCTION_PORT: 8080
ports: ["9002:9000"] # map the container (Cloudstate proxy) port 9000 to port 9002 on the host
#------------------------------------------------------------------------
# The "user-function" are Cloudstate-aware services
# which implement the business logic of the Chat application
#------------------------------------------------------------------------
friends-userfunc:
image: lightbend-docker-registry.bintray.io/cloudstate-samples/chat-friends-js:latest
# use the same network stack than the container of the Cloudstate proxy
# Similar to a deployment on Kubernetes where
# the user container and its CS-Proxy sidecar are deployed in a same pod
network_mode: service:cloudstate-proxy-friends
environment:
DEBUG: cloudstate* # enable additional logs
presence-userfunc:
image: lightbend-docker-registry.bintray.io/cloudstate-samples/chat-presence-js:latest
network_mode: service:cloudstate-proxy-presence
environment:
DEBUG: cloudstate* # enable additional logs