-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
86 lines (79 loc) · 2.16 KB
/
docker-compose.yml
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
74
75
76
77
78
79
80
81
82
83
84
85
86
version: "3"
services:
# Core API services are pinned, HA is provided for functions.
gateway:
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
ports:
- 8080:8080
image: functions/gateway:0.6.2
networks:
- functions
environment:
faas_nats_address: "nats"
faas_nats_port: 4222
dnsrr: "true" # Temporarily use dnsrr in place of VIP while issue persists on PWD
deploy:
placement:
constraints: [node.role == manager]
nats:
image: nats-streaming:0.5.0
ports:
- 4222:4222
- 8222:8222
command: "--store memory --cluster_id faas-cluster"
networks:
- functions
queue-worker:
image: functions/queue-worker:0.1.1
networks:
- functions
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 20
window: 380s
cron:
image: vfarcic/docker-flow-cron
networks:
- functions
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 9080:8080
deploy:
placement:
constraints: [node.role == manager]
swarm-listener:
image: vfarcic/docker-flow-swarm-listener
networks:
- functions
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DF_NOTIFY_CREATE_SERVICE_URL=http://cron:8080/v1/docker-flow-cron/job/create
- DF_NOTIFY_REMOVE_SERVICE_URL=http://cron:8080/v1/docker-flow-cron/job/remove
deploy:
placement:
constraints: [node.role == manager]
#cronjob:
# image: alpine
# command: wget http://gateway:8080/function/url_ping --post-data="http://jmkhael.io/"
# networks:
# - functions
# deploy:
#replicas: 0
# restart_policy:
# condition: none
# labels:
# - "com.df.notify=true"
# - "com.df.cron=true"
# - "com.df.cron.name=cronjob"
# - "com.df.cron.image=alpine"
# - "com.df.cron.command=echo Hello World"
# - "com.df.cron.schedule=@every 10s"
networks:
functions:
driver: overlay
#attachable: true