-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
136 lines (129 loc) · 4.22 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
136 lines (129 loc) · 4.22 KB
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
# Lightweight dev stack.
# Services run natively via `ironic dev` for hot reload.
services:
postgres:
image: postgres:16-alpine
container_name: exeos-dev-pg
environment:
POSTGRES_USER: ${POSTGRES_USER:-exeos}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-dev}
POSTGRES_DB: ${POSTGRES_DB:-exeos}
ports:
- "5432:5432"
volumes:
- ./postgres/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER:-exeos}"]
interval: 5s
timeout: 3s
retries: 5
redis:
image: redis:7-alpine
container_name: exeos-dev-redis
command: ["redis-server", "--requirepass", "${REDIS_PASSWORD:-dev}", "--appendonly", "no"]
ports:
- "6379:6379"
zookeeper:
image: confluentinc/cp-zookeeper:7.6.1
container_name: exeos-dev-zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
healthcheck:
test: ["CMD", "nc", "-z", "127.0.0.1", "2181"]
interval: 10s
timeout: 3s
retries: 5
start_period: 20s
kafka:
image: confluentinc/cp-kafka:7.6.1
container_name: exeos-dev-kafka
depends_on:
zookeeper:
condition: service_healthy
entrypoint:
- bash
- -c
- |
zookeeper-shell zookeeper:2181 "deleteall /brokers/ids/1" 2>/dev/null
/etc/confluent/docker/run
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
KAFKA_LOG_RETENTION_MS: ${KAFKA_LOG_RETENTION_MS:-604800000}
KAFKA_LOG_RETENTION_BYTES: ${KAFKA_LOG_RETENTION_BYTES:--1}
KAFKA_LOG_CLEANUP_POLICY: ${KAFKA_LOG_CLEANUP_POLICY:-delete}
ports:
- "9092:9092"
healthcheck:
test: ["CMD", "nc", "-z", "127.0.0.1", "9092"]
interval: 10s
timeout: 3s
retries: 5
start_period: 30s
kafka-setup:
image: confluentinc/cp-kafka:7.6.1
container_name: exeos-dev-kafka-setup
depends_on:
kafka:
condition: service_healthy
network_mode: "service:kafka"
environment:
TOPIC_RETENTION_MS: ${TOPIC_RETENTION_MS:-604800000}
TOPIC_RETENTION_BYTES: ${TOPIC_RETENTION_BYTES:--1}
TOPIC_CLEANUP_POLICY: ${TOPIC_CLEANUP_POLICY:-delete}
TOPIC_PARTITIONS: ${TOPIC_PARTITIONS:-1}
TOPIC_REPLICATION: ${TOPIC_REPLICATION:-1}
entrypoint:
- bash
- -c
- |
sleep 3
kafka-topics --create --topic exeos-events \
--bootstrap-server localhost:9092 \
--partitions "$TOPIC_PARTITIONS" \
--replication-factor "$TOPIC_REPLICATION" \
--config retention.ms="$TOPIC_RETENTION_MS" \
--config retention.bytes="$TOPIC_RETENTION_BYTES" \
--config cleanup.policy="$TOPIC_CLEANUP_POLICY" \
--if-not-exists
restart: "no"
swagger-ui:
image: swaggerapi/swagger-ui:latest
container_name: exeos-dev-swagger
ports:
- "8090:8080"
environment:
URLS: >
[
{ "name": "Identity", "url": "http://localhost:9080/openapi/identity.json" },
{ "name": "Notification", "url": "http://localhost:9080/openapi/notification.json" },
{ "name": "Audit", "url": "http://localhost:9080/openapi/audit.json" },
{ "name": "Analytics", "url": "http://localhost:9080/openapi/analytics.json" }
]
URLS_PRIMARY_NAME: Identity
apisix:
image: apache/apisix:3.17.0-debian
container_name: exeos-dev-apisix
ports:
- "9080:9080"
- "9091:9091"
volumes:
- ./apisix/config.yaml:/usr/local/apisix/conf/config.yaml
- ./apisix/apisix.yaml:/usr/local/apisix/conf/apisix.yaml:ro
environment:
JWT_SECRET: ${JWT_SECRET:-dev-jwt-secret}
API_KEY: ${API_KEY:-dev-api-key}
REDIS_PASSWORD: ${REDIS_PASSWORD:-dev}
CORS_ORIGINS: ${CORS_ORIGINS:-*}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started