-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-example.yml
More file actions
106 lines (101 loc) · 2.33 KB
/
docker-compose-example.yml
File metadata and controls
106 lines (101 loc) · 2.33 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
services:
postgres:
image: postgres:15
container_name: gateway-postgres
ports:
- "5436:5432"
env_file:
- .env.deploy
deploy:
resources:
limits:
cpus: '0.50'
memory: 512M
reservations:
cpus: '0.25'
memory: 256M
command: >
postgres -c max_connections=1000
-c shared_buffers=256MB
-c effective_cache_size=768MB
-c maintenance_work_mem=64MB
-c checkpoint_completion_target=0.7
-c wal_buffers=16MB
-c default_statistics_target=100
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $POSTGRES_USER -d $POSTGRES_DB"]
interval: 30s
timeout: 10s
retries: 5
restart: unless-stopped
tty: true
stdin_open: true
volumes:
- postgres-gateway-data:/var/lib/postgresql/data
networks:
- custom_net
redis:
image: redis:8.2
container_name: gateway-redis
restart: unless-stopped
ports:
- "6380:6379"
env_file:
- .env.deploy
command: >
redis-server
--requirepass ${REDIS_PASSWORD}
--appendonly yes
--appendfilename "appendonly.aof"
--dir /data
--save 900 1
--save 300 10
--save 60 10000
--maxmemory 512mb
--maxmemory-policy allkeys-lru
--notify-keyspace-events Ex
volumes:
- redis-gateway-data:/data
healthcheck:
test: [ "CMD", "redis-cli", "-a", "${REDIS_PASSWORD}", "ping" ]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
networks:
- custom_net
kafka:
image: confluentinc/cp-kafka:latest
container_name: kafka
env_file:
- .env
ports:
- "9092:9092"
healthcheck:
test: [ "CMD-SHELL", "/usr/bin/kafka-broker-api-versions --bootstrap-server localhost:9092 > /dev/null 2>&1" ]
interval: 10s
timeout: 10s
retries: 10
volumes:
- kafka-data:/var/lib/kafka/data
networks:
- custom_net
app:
build: ../..
container_name: gateway
ports:
- "8080:8080"
env_file:
- .env.deploy
depends_on:
- gateway-postgres
- gateway-redis
networks:
- custom_net
volumes:
postgres-gateway-data:
redis-gateway-data:
kafka-data:
networks:
custom_net:
driver: bridge