-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdocker-compose.yml
102 lines (94 loc) · 2.15 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
version: "3.9"
x-common-variables: &common-variables
AMQP_URI: amqp://guest:guest@rabbitmq:5672/
WAIT_HOSTS: "rabbitmq:5672"
WAIT_HOSTS_TIMEOUT: 300
WAIT_SLEEP_INTERVAL: 10
WAIT_HOST_CONNECT_TIMEOUT: 30
CONVERT_TO_WEBP_QUEUE: convert
SEND_WEBP_TO_WHATSAPP_QUEUE: complete
LOG_METRIC_QUEUE : metric
LOG_LEVEL : info
VERIFY_TOKEN: ${VERIFY_TOKEN}
BEARER_ACCESS_TOKEN: ${BEARER_ACCESS_TOKEN}
services:
whatsticker-lb:
image: nginx:latest
restart: always
ports:
- "9000:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
depends_on:
- whatsticker-master
whatsticker-master:
build:
context: "."
dockerfile: ./master/Dockerfile
restart: always
depends_on:
- rabbitmq
command: bash -c "/wait && go run master/main.go -log-level DEBUG"
volumes:
- images:/project/images
- videos:/project/videos
environment:
<<: *common-variables
expose:
- "9000"
deploy:
mode: replicated
replicas: 3
whatsticker-worker:
build:
context: "."
dockerfile: ./worker/Dockerfile
restart: always
platform: linux/x86_64
depends_on:
- rabbitmq
command: bash -c "/wait && go run worker/main.go"
volumes:
- images:/project/images
- videos:/project/videos
deploy:
mode: replicated
replicas: 3
environment:
<<: *common-variables
whatsticker-logger:
build:
context: "."
dockerfile: ./logger/Dockerfile
restart: always
depends_on:
- rabbitmq
command: bash -c "/wait && go run logger/main.go"
environment:
<<: *common-variables
ports:
- "9091:9091"
rabbitmq:
restart: always
hostname: rabbitmq
image: rabbitmq:3-management-alpine
ports:
- 5672:5672
- 8080:15672
volumes:
- /var/lib/rabbitmq/
- /var/log/rabbitmq/
# grafana:
# image: grafana/grafana
# ports:
# - 3000:3000
# prometheus:
# hostname: rabbitmq
# image: prom/prometheus
# volumes:
# - ${PWD}/utils/prometheus.yml:/etc/prometheus/prometheus.yml
# ports:
# - 9090:9090
volumes:
images:
videos: