-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
95 lines (88 loc) · 2.34 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
---
version: '3'
services:
zookeeper:
image: confluentinc/cp-zookeeper:6.2.0
hostname: zookeeper
container_name: zookeeper
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
networks:
- popug-jira
broker:
image: confluentinc/cp-server:6.2.0
hostname: broker
container_name: broker
depends_on:
- zookeeper
ports:
- "9092:9092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_LISTENERS: INTERNAL://broker:29092,EXTERNAL://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: INTERNAL://broker:29092,EXTERNAL://localhost:9092
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
networks:
- popug-jira
db:
image: postgres
container_name: psql
volumes:
- ./tmp/db:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: password
networks:
- popug-jira
oauth:
container_name: oauth
build: ./auth/.
command: ['rails', 'server', '-p', '3000', '-b', '0.0.0.0']
ports:
- "3000:3000"
depends_on:
- db
- broker
environment:
RAILS_ENV: 'development'
DATABASE_URL: 'postgres://postgres:password@db:5432/postgres'
KAFKA_URL: 'kafka://broker:29092'
BROKER_ADAPTER: 'kafka'
networks:
- popug-jira
task:
container_name: task
build: ./task_management
command: python manage.py runserver 0.0.0.0:8000
ports:
- "8000:8000"
environment:
DEBUG: '1'
SECRET_KEY: 'foo'
DJANGO_ALLOWED_HOSTS: 'localhost 127.0.0.1 [::1] 0.0.0.0'
SQL_ENGINE: 'django.db.backends.postgresql'
SQL_DATABASE: 'postgres'
SQL_USER: 'postgres'
SQL_PASSWORD: 'password'
SQL_HOST: 'db'
SQL_PORT: '5432'
FLUSH_DB: '0'
OAUTH_CLIENT_ID: 'SeVpcg_qW-2mlXBi48m6rxQ7P91qf-x3DKa7AbjBxPg'
OAUTH_CLIENT_SECRET: 'QNeDxd6B__wZcnn4qxMz3iKOIcVOrRu0fRVwkXuVsdw'
OAUTH_AUTH_URL: 'http://localhost:3000/oauth/authorize'
depends_on:
- db
- broker
- oauth
networks:
- popug-jira
# network needs to be created manually, by:
# docker network create popug-jira
networks:
popug-jira:
driver: bridge