-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
73 lines (69 loc) · 1.9 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
services:
mariadb:
image: mariadb
healthcheck:
test: ["CMD", "/usr/local/bin/healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized"]
start_period: 20s
interval: 5s
timeout: 5s
retries: 5
environment:
MYSQL_ROOT_PASSWORD: admin
MYSQL_DATABASE: eigr-functions-db
MYSQL_USER: admin
MYSQL_PASSWORD: admin
volumes:
- mariadb:/var/lib/mysql
ports:
- "3307:3306"
nats:
image: nats:2
ports:
- "8222:8222"
- "4222:4222"
spawn:
# build:
# context: https://github.com/eigr/spawn.git#main
# dockerfile: ./Dockerfile-proxy
# image: spawn/proxy:main-localbuild
image: eigr/spawn-proxy:1.4.2-rc.2
environment:
SPAWN_USE_INTERNAL_NATS: "false"
SPAWN_PUBSUB_ADAPTER: nats
SPAWN_PUBSUB_NATS_HOSTS: nats://nats:4222
SPAWN_STATESTORE_KEY: 3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE=
PROXY_ACTOR_SYSTEM_NAME: spawn-system
PROXY_CLUSTER_STRATEGY: gossip
PROXY_DATABASE_PORT: 3306
PROXY_DATABASE_TYPE: mariadb
PROXY_DATABASE_HOST: mariadb
PROXY_HTTP_PORT: 9001
USER_FUNCTION_PORT: 8091
USER_FUNCTION_HOST: "app"
# USER_FUNCTION_HOST: "host.docker.internal" # Used when run app in localhost instead container.
# extra_hosts:
# - "host.docker.internal:host-gateway" # Used when run app in localhost instead container.
depends_on:
mariadb:
condition: service_healthy
ports:
- "9001:9001"
app:
build:
context: .
image: postalcode-spawn-java-demo:localbuild
environment:
ACTOR_PORT: 8091
ACTOR_HOST: "app"
SPAWN_PROXY_PORT: 9001
SPAWN_PROXY_HOST: "spawn"
SPAWN_SYSTEM_NAME: "spawn-system"
depends_on:
mariadb:
condition: service_healthy
# spawn-proxy:
# condition: service_healthy
ports:
- "8080:8080"
volumes:
mariadb: