-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
95 lines (88 loc) · 2.22 KB
/
Copy pathdocker-compose.yml
File metadata and controls
95 lines (88 loc) · 2.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
services:
app-web:
container_name: dps-web
build: .
command: ["php-fpm"]
volumes:
- .:/app
- app:/var/www
depends_on:
postgres: { condition: service_healthy }
redis: { condition: service_healthy }
app-worker:
container_name: dps-worker
build: .
volumes:
- .:/app
- app:/var/www
depends_on:
postgres: { condition: service_healthy }
redis: { condition: service_healthy }
nginx:
container_name: dps-nginx
image: nginx:alpine
ports:
- "8000:80"
volumes:
- ./docker/nginx.conf:/etc/nginx/conf.d/default.conf
- app:/var/www
depends_on:
- app-web
postgres:
container_name: dps-postgres
image: postgres:16-alpine
environment:
POSTGRES_DB: records_db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports: ["5433:5432"]
volumes: [pgdata:/var/lib/postgresql/data]
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
retries: 5
redis:
container_name: dps-redis
image: redis:7-alpine
ports: ["6380:6379"]
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
retries: 5
kafka:
container_name: dps-kafka
image: apache/kafka:latest
restart: unless-stopped
deploy:
resources:
limits:
cpus: "0.35"
memory: 712M
ports:
- "9093:9092"
environment:
- KAFKA_NODE_ID=0
- KAFKA_PROCESS_ROLES=controller,broker
- KAFKA_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://dps-kafka:9092
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
- KAFKA_CONTROLLER_QUORUM_VOTERS=0@dps-kafka:9093
- KAFKA_CONTROLLER_LISTENER_NAMES=CONTROLLER
- KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
- KAFKA_NUM_PARTITIONS=3
volumes:
- kafka_data:/var/lib/kafka/data
kafka-ui:
container_name: dps-kafka-ui
image: provectuslabs/kafka-ui:latest
ports:
- "8080:8080"
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: dps-kafka:9092
depends_on:
- kafka
volumes:
pgdata:
kafka_data:
app: