-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
120 lines (106 loc) · 2.8 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
services:
kafka:
container_name: kafka
image: obsidiandynamics/kafka
restart: "no"
ports:
- "2181:2181"
- "9092:9092"
networks:
- email-ms
environment:
KAFKA_LISTENERS: "INTERNAL://:29092,EXTERNAL://:9092"
KAFKA_ADVERTISED_LISTENERS: "INTERNAL://kafka:29092,EXTERNAL://localhost:9092"
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT"
KAFKA_INTER_BROKER_LISTENER_NAME: "INTERNAL"
KAFKA_ZOOKEEPER_SESSION_TIMEOUT: "6000"
KAFKA_RESTART_ATTEMPTS: "10"
KAFKA_RESTART_DELAY: "5"
ZOOKEEPER_AUTOPURGE_PURGE_INTERVAL: "0"
# volumes:
# - ./data/kafka/data:/var/lib/kafka/data
redpanda-console:
container_name: redpanda
image: docker.redpanda.com/vectorized/console:latest
restart: on-failure
entrypoint: /bin/sh
command: -c "echo \"$$CONSOLE_CONFIG_FILE\" > /tmp/config.yml; /app/console"
ports:
- "8081:8080"
networks:
- email-ms
environment:
CONFIG_FILEPATH: /tmp/config.yml
CONSOLE_CONFIG_FILE: |
kafka:
brokers: ["kafka:29092"]
depends_on:
- "kafka"
user-service-db:
image: postgres:latest
container_name: user-service-db
environment:
POSTGRES_DB: user-service-db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
PG_DATA: /data/postgres
networks:
- email-ms
ports:
- "5432:5432"
email-service-db:
image: postgres:latest
container_name: email-service-db
environment:
POSTGRES_DB: email-service-db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
PG_DATA: /data/postgres
networks:
- email-ms
ports:
- "5433:5432"
user-service:
build: ./user-service
container_name: user-service
networks:
- email-ms
depends_on:
- kafka
- user-service-db
environment:
KAFKA_BROKER: kafka:29092
DB_HOST: user-service-db
DB_PORT: 5432
DB_NAME: user-service-db
DB_USER: postgres
DB_PASSWORD: postgres
ports:
- "8080:8080"
email-service:
build: ./email-service
container_name: email-service
networks:
- email-ms
depends_on:
- kafka
- email-service-db
environment:
KAFKA_BROKER: kafka:29092
DB_HOST: email-service-db
DB_PORT: 5432
DB_NAME: email-service-db
DB_USER: postgres
DB_PASSWORD: postgres
EMAIL: # E-mail do remetente
PASSWORD_APP: # Senha ou token do e-mail (app password)
MAIL_HOST: smtp.gmail.com # Pode mudar para o servidor SMTP usado, como SES
MAIL_PORT: 587
MAIL_PROTOCOL: smtp
MAIL_SMTP_AUTH: "true"
MAIL_SMTP_STARTTLS_ENABLE: "true"
ports:
- "8082:8082"
networks:
email-ms:
driver: bridge