-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
124 lines (116 loc) · 2.77 KB
/
docker-compose.yml
File metadata and controls
124 lines (116 loc) · 2.77 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
version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:15-alpine
container_name: videogen-postgres
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: videogen_messenger
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
networks:
- videogen-network
# Redis Cache & Queue
redis:
image: redis:7-alpine
container_name: videogen-redis
ports:
- "6379:6379"
command: redis-server --appendonly yes
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- videogen-network
# Elasticsearch Search Engine
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.11.0
container_name: videogen-elasticsearch
ports:
- "9200:9200"
- "9300:9300"
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- cluster.name=videogen-cluster
- node.name=videogen-node-1
volumes:
- elasticsearch_data:/usr/share/elasticsearch/data
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:9200/_cluster/health || exit 1"]
interval: 30s
timeout: 10s
retries: 5
networks:
- videogen-network
deploy:
resources:
limits:
memory: 1GB
# Kibana (Optional - for Elasticsearch visualization)
kibana:
image: docker.elastic.co/kibana/kibana:8.11.0
container_name: videogen-kibana
ports:
- "5601:5601"
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
depends_on:
- elasticsearch
networks:
- videogen-network
profiles:
- optional
# Redis Commander (Optional - Redis GUI)
redis-commander:
image: rediscommander/redis-commander:latest
container_name: videogen-redis-commander
ports:
- "8081:8081"
environment:
- REDIS_HOSTS=local:redis:6379
depends_on:
- redis
networks:
- videogen-network
profiles:
- optional
# pgAdmin (Optional - PostgreSQL GUI)
pgadmin:
image: dpage/pgadmin4:latest
container_name: videogen-pgadmin
ports:
- "5050:80"
environment:
PGADMIN_DEFAULT_EMAIL: admin@videogen.local
PGADMIN_DEFAULT_PASSWORD: admin
depends_on:
- postgres
networks:
- videogen-network
profiles:
- optional
volumes:
postgres_data:
driver: local
redis_data:
driver: local
elasticsearch_data:
driver: local
networks:
videogen-network:
driver: bridge