-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-queue.yml
149 lines (144 loc) · 4.13 KB
/
docker-compose-queue.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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
version: "3.7"
services:
eventhos-db:
build:
context: ./mysql-mod
dockerfile: Dockerfile
image: mysql-mod:5.7
container_name: eventhos-db
command: mysqld --sql_mode="" --max_connections=1100 --general-log=1 --general-log-file=/tmp/mysql-general-log.log
ports:
- "3306:3306"
volumes:
- ./eventhos-api/database/latest:/docker-entrypoint-initdb.d
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD:-changeme}
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-changeme}
MYSQL_USER: "usr_eventhos"
MYSQL_DATABASE: "eventhos"
TZ: America/Lima
deploy:
resources:
limits:
memory: 512M
healthcheck:
test: 'cat /tmp/mysql-general-log.log | grep "[MYSQL_READY]"'
interval: 10s
retries: 120
eventhos-api:
build:
context: ./eventhos-api
dockerfile: Dockerfile
container_name: eventhos-api
ports:
- "${EVENTHOS_API_PORT:-2109}:2109"
environment:
USE_QUEUE: true
QUEUE_HOST: host.docker.internal
QUEUE_PORT: 61613
QUEUE_USER: eventhos
QUEUE_PASSWORD: secret
QUEUE_DESTINATION: eventhos
QUEUE_HEART_BEAT: 0,0
CPU_COUNT: 1
CRYPTO_KEY: ${CRYPTO_KEY:-changeme}
DATA_BASE_ACQUIRE_CONNECTION_TIMEOUT: 10000
DATA_BASE_HOST: host.docker.internal
DATA_BASE_NAME: "eventhos"
DATA_BASE_PASSWORD: ${MYSQL_PASSWORD:-changeme}
DATA_BASE_POOL_MAX: 300
DATA_BASE_POOL_MIN: 100
DATA_BASE_PORT: 3306
DATA_BASE_TIMEZONE: "+00:00"
DATA_BASE_USER: "usr_eventhos"
ENVIRONMENT_ALIAS: Integration
JWT_SECRET: ${JWT_SECRET:-changeme}
LOG_LEVEL: ${LOG_LEVEL:-info}
NODE_ENV: "production"
PORT: 2109
RAW_SENSIBLE_PARAMS: access-key,authorization
SMTP_CREDENTIAL_PASSWORD: changeme
SMTP_CREDENTIAL_USER: admin@mail.com
SMTP_DEFAULT_RECIPIENT: jane@mail.com
SMTP_ENABLE_SSL: false
SMTP_FROM_ALIAS: admin
SMTP_HOST: host.docker.internal
SMTP_PORT: 1025
SMTP_TLS_CIPHERS: SSLv3
TZ: America/Lima
healthcheck:
test: curl --fail http://localhost:2109 || exit 1
interval: 10s
retries: 100
start_period: 20s
timeout: 10s
depends_on:
eventhos-db:
condition: service_healthy
fake-smtp-server:
condition: service_healthy
networks:
- app_network
extra_hosts:
- "host.docker.internal:host-gateway"
deploy:
resources:
limits:
memory: 512M
eventhos-web:
build:
context: ./eventhos-web
dockerfile: Dockerfile
container_name: eventhos-web
ports:
- "${EVENTHOS_WEB_PORT:-2110}:2110"
environment:
EVENTHOS_API_BASE_URL: "${EVENTHOS_API_BASE_URL:-http://localhost:2109}"
TZ: America/Lima
depends_on:
eventhos-api:
condition: service_healthy
networks:
- app_network
extra_hosts:
- "host.docker.internal:host-gateway"
deploy:
resources:
limits:
memory: 128M
fake-smtp-server:
image: haravich/fake-smtp-server:1.0.1
container_name: fake-smtp-server
ports:
- '1025:1025'
- '1080:1080'
environment:
TZ: America/Lima
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:1080 || exit 1
interval: 10s
retries: 100
start_period: 20s
timeout: 10s
eventhos-activemq:
image: webcenter/activemq:latest
container_name: activemq
ports:
- 8161:8161
- 61616:61616
- 61613:61613
environment:
# ACTIVEMQ_CONFIG_NAME: eventhos
ACTIVEMQ_CONFIG_MINMEMORY: 512
ACTIVEMQ_CONFIG_MAXMEMORY: 1024
ACTIVEMQ_CONFIG_DEFAULTACCOUNT: false
ACTIVEMQ_ADMIN_LOGIN: admin
ACTIVEMQ_ADMIN_PASSWORD: admin
ACTIVEMQ_USERS_eventhos: secret
ACTIVEMQ_GROUPS_owners: eventhos
JAVA_OPTS: -Dfile.encoding=UTF-8
TZ: America/Lima
restart: always
networks:
app_network:
driver: bridge