This repository has been archived by the owner on May 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 58
/
docker-compose.yml
124 lines (114 loc) · 2.56 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
version: '3.2'
# Yacs primary services
# Defaults for all environments
services:
# Application services
core:
build: ./core
environment:
- RAILS_ENV
- SECRET_KEY_BASE
- SECRET_TOKEN
- WEB_CONCURRENCY
- MAX_THREADS
volumes:
- ./ssl:/etc/ssl/yacs
depends_on:
- postgres
- redis
command: bin/start.sh
expose:
- "4100"
extra_hosts:
- "kafka-server:138.197.2.46"
core-consumer:
build: ./core
environment:
- RAILS_ENV
- COURSES_TOPIC_NAME=course_change # Customize Kafka topic name for courses here
- SECTIONS_TOPIC_NAME=section_change # Customize Kafka topic name for sections here
- TERM_SHORTNAME
- UNI_SHORTNAME
depends_on:
- postgres
- redis
- kafka
command: bin/start-consumer.sh
web:
build: ./web
volumes:
- dist-web:/usr/src/app/dist-web
depends_on:
- core
expose:
- "4200"
malg:
build: ./malg
depends_on:
- kafka
- zookeeper
- redis
expose:
- "4500"
environment:
- UNI_SHORTNAME
- TERM_SHORTNAME
# Dependency services
postgres:
image: postgres:10.5-alpine
expose:
- "5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 10s
retries: 3
redis:
image: redis:5.0-rc-alpine
expose:
- "6379"
nginx:
build: ./nginx
ports:
- "80:80"
- "443:443"
links:
- core
- user_backend
volumes:
- ./ssl:/etc/ssl/yacs
- dist-web:/usr/src/app/dist-web
zookeeper:
image: wurstmeister/zookeeper
expose:
- "2181"
kafka:
image: wurstmeister/kafka:1.0.0
depends_on:
- zookeeper
expose:
- "9094"
- "9092"
hostname: kafka
environment:
KAFKA_ADVERTISED_HOST_NAME: "kafka"
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
KAFKA_ADVERTISED_PROTOCOL_NAME: OUTSIDE
KAFKA_ADVERTISED_PORT: 9094
KAFKA_PROTOCOL_NAME: INSIDE
KAFKA_PORT: 9092
#KAFKA_CREATE_TOPICS: "create:1:1,update:1:1,delete:1:1"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
healthcheck:
test: ["CMD-SHELL", "/opt/kafka/bin/kafka-topics.sh --zookeeper zookeeper:2181 --list"]
user_backend:
build: https://github.com/YACS-RCOS/yacs-user-backend.git
tty: true
volumes:
- ./user-backend:/usr/src/app/user-backend
expose:
- "5000"
volumes:
dist-web: