-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
143 lines (135 loc) · 3.33 KB
/
Copy pathdocker-compose.yml
File metadata and controls
143 lines (135 loc) · 3.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
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
services:
php:
image: mappia/magento-php:devcontainer8.3
environment:
- PHP_IDE_CONFIG=serverName=magento
- CONFIG__DEFAULT__CATALOG__SEARCH__OPENSEARCH_SERVER_HOSTNAME=opensearch
- CONFIG__DEFAULT__CATALOG__SEARCH__ENGINE=opensearch
- CONFIG__DEFAULT__CATALOG__SEARCH__OPENSEARCH_SERVER_PORT=9200
# GitHub Codespaces' port-forwarder rewrites Host to localhost:<port>
# and puts the real hostname in X-Forwarded-Host, which Magento doesn't
# honor — causing an ERR_TOO_MANY_REDIRECTS loop on canonical redirect.
- CONFIG__DEFAULT__WEB__URL__REDIRECT_TO_BASE=0
networks:
- magento
depends_on:
db:
condition: service_healthy
opensearch:
condition: service_healthy
rabbitmq:
condition: service_healthy
redis:
condition: service_healthy
nginx:
image: nginx:1.28
environment:
- MAGENTO2_UPSTREAM=php
- MAGENTO2_UPSTREAM_PORT=9000
- NGINX_PORT=8000
- NGINX_TLS_PORT=8443
- MAGENTO_TLS_CERT=snakeoil.crt
- MAGENTO_TLS_KEY=snakeoil.key
ports:
- "8000:8000"
- "8443:8443"
networks:
- magento
depends_on:
- php
db:
image: mariadb:10.11
environment:
MYSQL_ROOT_PASSWORD: magento
MYSQL_DATABASE: magento
MYSQL_USER: magento
MYSQL_PASSWORD: magento
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
networks:
- magento
command: --max_allowed_packet=256M
healthcheck:
test: ["CMD", "healthcheck.sh", "--su-mysql", "--connect"]
interval: 5s
timeout: 5s
retries: 20
start_period: 30s
opensearch:
image: opensearchproject/opensearch:2.19.1
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=TH65Fda4IIZoNVSAF6R0lgP&
- plugins.security.disabled=true
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
ports:
- "9200:9200"
- "9600:9600"
volumes:
- opensearch_data:/usr/share/opensearch/data
networks:
- magento
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:9200/_cluster/health || exit 1"]
interval: 5s
timeout: 5s
retries: 30
start_period: 60s
rabbitmq:
image: rabbitmq:3.13-management
environment:
RABBITMQ_DEFAULT_USER: magento
RABBITMQ_DEFAULT_PASS: magento
ports:
- "5672:5672"
- "15672:15672"
volumes:
- rabbitmq_data:/var/lib/rabbitmq
networks:
- magento
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "ping"]
interval: 5s
timeout: 10s
retries: 20
start_period: 30s
redis:
image: redis:7.2
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- magento
command: redis-server --appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 10
start_period: 5s
mailpit:
image: axllent/mailpit:v1.29.0
ports:
- "8025:8025"
- "1025:1025"
networks:
- magento
volumes:
db_data:
opensearch_data:
rabbitmq_data:
redis_data:
networks:
magento:
driver: bridge