-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
164 lines (160 loc) · 4.23 KB
/
docker-compose.yml
File metadata and controls
164 lines (160 loc) · 4.23 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
services:
redbox-django-app:
image: redbox-django-app:latest
container_name: django_app
build:
context: .
dockerfile: ./django_app/Dockerfile
depends_on:
db:
condition: service_healthy
minio:
condition: service_healthy
opensearch:
condition: service_healthy
networks:
- redbox-app-network
env_file:
- path: tests/.env.integration
required: false
- path: .env
required: false
environment:
- ENVIRONMENT=${ENVIRONMENT:-production}
volumes:
- /app/django_app/frontend/node_modules
- ./django_app:/app/django_app/
- .aws:/root/.aws
ports:
- "${PORT:-8080}:${PORT:-8080}"
healthcheck:
test: curl --fail http://localhost:${PORT:-8080}/health/ || exit 1
interval: 5s
timeout: 30s
retries: 24
start_period: 60s
db:
image: postgres:14
container_name: db
env_file:
- path: tests/.env.integration
required: false
- path: .env
required: false
volumes:
- local_postgres_data:/var/lib/postgresql/data:Z
networks:
- redbox-app-network
ports:
- "5432:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready", "-U", "redbox-core", "-d", "db_prod" ]
interval: 5s
timeout: 30s
retries: 24
start_period: 30s
requirements:
image: python:3.12
profiles:
- utils
volumes:
- ./:/app/:z
redbox-worker:
image: redbox-worker:latest
container_name: worker
build:
context: .
dockerfile: django_app/Dockerfile
command: "venv/bin/django-admin qcluster"
env_file:
- path: tests/.env.integration
required: false
- path: .env
required: false
volumes:
- .aws:/root/.aws
depends_on:
opensearch:
condition: service_healthy
minio:
condition: service_healthy
redbox-django-app:
condition: service_healthy
db:
condition: service_healthy
networks:
- redbox-app-network
restart: unless-stopped
minio:
image: minio/minio
container_name: minio
expose:
- "9000"
- "9001"
ports:
- "9000:9000"
- "9001:9001"
environment:
- MINIO_ACCESS_KEY=minioadmin
- MINIO_SECRET_KEY=minioadmin
command: server --console-address ":9001" /data
networks:
- redbox-app-network
volumes:
- ./data/objectstore:/data
restart: unless-stopped
healthcheck:
test: [ "CMD", "mc", "ready", "local" ]
interval: 5s
timeout: 30s
retries: 24
start_period: 30s
opensearch:
image: opensearchproject/opensearch:3
container_name: opensearch
environment:
- discovery.type=single-node
- OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m
- plugins.security.disabled=true # Disable security plugin for simplicity
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_INITIAL_ADMIN_PASSWORD} # Sets the demo admin user password when using demo configuration (for OpenSearch 2.12 and later)
volumes:
- opensearch-data:/usr/share/opensearch/data
ports:
- "9200:9200"
networks:
- redbox-app-network
healthcheck:
test: curl --fail http://localhost:9200/_cluster/health || exit 1
interval: 5s
timeout: 30s
retries: 24
start_period: 60s
restart: unless-stopped
opensearch-dashboards:
# Make sure the version of opensearch-dashboards matches the version of opensearch installed on other nodes
image: opensearchproject/opensearch-dashboards:3
container_name: opensearch_dashboards
ports:
# Map host port 5601 to container port 5601
- 5601:5601
expose:
# Expose port 5601 for web access to OpenSearch Dashboards
- "5601"
environment:
# Define the OpenSearch nodes that OpenSearch Dashboards will query
- 'OPENSEARCH_HOSTS=["http://opensearch:9200"]'
- DISABLE_SECURITY_DASHBOARDS_PLUGIN=true
networks:
- redbox-app-network
depends_on:
opensearch:
condition: service_healthy
restart: unless-stopped
networks:
redbox-app-network:
driver: bridge
name: redbox-app-network
volumes:
opensearch-data:
redbox-app-data:
local_postgres_data: {}