Skip to content

Commit 7eadf3c

Browse files
committed
Adds MySQL 8.4 and corrects sample files
1 parent da447c0 commit 7eadf3c

File tree

9 files changed

+256
-2
lines changed

9 files changed

+256
-2
lines changed

config/mysql-84/etc/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
my.cnf
Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
# used for normal multi website or store setup
2+
root $MAGE_ROOT/pub;
3+
4+
index index.php;
5+
autoindex off;
6+
charset UTF-8;
7+
error_page 404 403 = /errors/404.php;
8+
#add_header "X-UA-Compatible" "IE=Edge";
9+
10+
11+
# Deny access to sensitive files
12+
location /.user.ini {
13+
deny all;
14+
}
15+
16+
# PHP entry point for setup application
17+
location ~* ^/setup($|/) {
18+
root $MAGE_ROOT;
19+
location ~ ^/setup/index.php {
20+
fastcgi_pass $PHP_BACKEND;
21+
22+
fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
23+
fastcgi_param PHP_VALUE "memory_limit=756M \n max_execution_time=600";
24+
fastcgi_read_timeout 600s;
25+
fastcgi_connect_timeout 600s;
26+
27+
fastcgi_index index.php;
28+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
29+
include fastcgi_params;
30+
}
31+
32+
location ~ ^/setup/(?!pub/). {
33+
deny all;
34+
}
35+
36+
location ~ ^/setup/pub/ {
37+
add_header X-Frame-Options "SAMEORIGIN";
38+
}
39+
}
40+
41+
# PHP entry point for update application
42+
location ~* ^/update($|/) {
43+
root $MAGE_ROOT;
44+
45+
location ~ ^/update/index.php {
46+
fastcgi_split_path_info ^(/update/index.php)(/.+)$;
47+
fastcgi_pass $PHP_BACKEND;
48+
fastcgi_index index.php;
49+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
50+
fastcgi_param PATH_INFO $fastcgi_path_info;
51+
include fastcgi_params;
52+
}
53+
54+
# Deny everything but index.php
55+
location ~ ^/update/(?!pub/). {
56+
deny all;
57+
}
58+
59+
location ~ ^/update/pub/ {
60+
add_header X-Frame-Options "SAMEORIGIN";
61+
}
62+
}
63+
64+
location / {
65+
try_files $uri $uri/ /index.php$is_args$args;
66+
}
67+
68+
location /pub/ {
69+
location ~ ^/pub/media/(downloadable|customer|import|custom_options|theme_customization/.*\.xml) {
70+
deny all;
71+
}
72+
alias $MAGE_ROOT/pub/;
73+
add_header X-Frame-Options "SAMEORIGIN";
74+
}
75+
76+
location /static/ {
77+
# Uncomment the following line in production mode
78+
# expires max;
79+
80+
# Remove signature of the static files that is used to overcome the browser cache
81+
location ~ ^/static/version\d*/ {
82+
rewrite ^/static/version\d*/(.*)$ /static/$1 last;
83+
}
84+
85+
location ~* \.(ico|jpg|jpeg|png|gif|svg|svgz|webp|avif|avifs|js|css|eot|ttf|otf|woff|woff2|html|json|webmanifest)$ {
86+
add_header Cache-Control "public";
87+
add_header X-Frame-Options "SAMEORIGIN";
88+
expires +1y;
89+
90+
if (!-f $request_filename) {
91+
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
92+
}
93+
}
94+
location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
95+
add_header Cache-Control "no-store";
96+
add_header X-Frame-Options "SAMEORIGIN";
97+
expires off;
98+
99+
if (!-f $request_filename) {
100+
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
101+
}
102+
}
103+
if (!-f $request_filename) {
104+
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
105+
}
106+
add_header X-Frame-Options "SAMEORIGIN";
107+
}
108+
109+
location /media/ {
110+
111+
try_files $uri $uri/ /get.php$is_args$args;
112+
113+
location ~ ^/media/theme_customization/.*\.xml {
114+
deny all;
115+
}
116+
117+
location ~* \.(ico|jpg|jpeg|png|gif|svg|svgz|webp|avif|avifs|js|css|eot|ttf|otf|woff|woff2)$ {
118+
add_header Cache-Control "public";
119+
add_header X-Frame-Options "SAMEORIGIN";
120+
expires +1y;
121+
try_files $uri $uri/ /get.php$is_args$args;
122+
}
123+
location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
124+
add_header Cache-Control "no-store";
125+
add_header X-Frame-Options "SAMEORIGIN";
126+
expires off;
127+
try_files $uri $uri/ /get.php$is_args$args;
128+
}
129+
add_header X-Frame-Options "SAMEORIGIN";
130+
}
131+
132+
location /media/customer/ {
133+
deny all;
134+
}
135+
136+
location /media/downloadable/ {
137+
deny all;
138+
}
139+
140+
location /media/import/ {
141+
deny all;
142+
}
143+
144+
location /media/custom_options/ {
145+
deny all;
146+
}
147+
148+
location /errors/ {
149+
location ~* \.xml$ {
150+
deny all;
151+
}
152+
}
153+
154+
# PHP entry point for main application
155+
location ~ ^/(index|get|static|errors/report|errors/404|errors/503|health_check|info)\.php$ {
156+
try_files $uri =404;
157+
fastcgi_pass $PHP_BACKEND;
158+
fastcgi_buffers 16 16k;
159+
fastcgi_buffer_size 32k;
160+
161+
fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
162+
fastcgi_param PHP_VALUE "memory_limit=756M \n max_execution_time=18000";
163+
fastcgi_param MAGE_RUN_TYPE $MAGE_RUN_TYPE;
164+
fastcgi_param MAGE_RUN_CODE $MAGE_RUN_CODE;
165+
fastcgi_read_timeout 600s;
166+
fastcgi_connect_timeout 600s;
167+
168+
fastcgi_index index.php;
169+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
170+
include fastcgi_params;
171+
}
172+
173+
gzip on;
174+
gzip_disable "msie6";
175+
176+
gzip_comp_level 6;
177+
gzip_min_length 1100;
178+
gzip_buffers 16 8k;
179+
gzip_proxied any;
180+
gzip_types
181+
text/plain
182+
text/css
183+
text/js
184+
text/xml
185+
text/javascript
186+
application/javascript
187+
application/x-javascript
188+
application/json
189+
application/xml
190+
application/xml+rss
191+
image/svg+xml;
192+
gzip_vary on;
193+
194+
# Banned locations (only reached if the earlier PHP entry point regexes don't match)
195+
location ~* (\.php$|\.phtml$|\.htaccess$|\.htpasswd$|\.git) {
196+
deny all;
197+
}

config/php-cli-81/sample/conf.d/vips.ini

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
;zend_extension=sourceguardian.so

config/php-fpm-81/sample/conf.d/sg.ini

Lines changed: 0 additions & 1 deletion
This file was deleted.

config/varnish-73/sample/default.vcl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
vcl 4.0;
2+
3+
backend default {
4+
.host = "apache-24";
5+
.port = "80";
6+
}
7+
8+
sub vcl_recv {
9+
10+
}
11+
12+
sub vcl_backend_response {
13+
14+
}
15+
16+
sub vcl_deliver {
17+
18+
}

data/mysql-84/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

docker-compose.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,26 @@ services:
8585
cap_add:
8686
- SYS_NICE
8787

88+
mysql-84:
89+
container_name: mysql-84
90+
env_file: env/db.env
91+
build:
92+
context: ./docker/mysql-84
93+
args:
94+
- USER_ID=${USER_ID}
95+
- GROUP_ID=${GROUP_ID}
96+
networks:
97+
app-tier:
98+
aliases:
99+
- mysql-84
100+
ports:
101+
- "3384:3306"
102+
volumes:
103+
- data_mysql_84:/var/lib/mysql
104+
- config_mysql_84_etc:/etc/mysql/conf.d
105+
cap_add:
106+
- SYS_NICE
107+
88108
percona-57:
89109
container_name: percona-57
90110
env_file: env/db.env
@@ -1529,6 +1549,18 @@ volumes:
15291549
type: none
15301550
device: ${DOCKER_VOLUME_BASE_PATH}/config/mysql-80/etc
15311551
o: bind
1552+
data_mysql_84:
1553+
driver: local
1554+
driver_opts:
1555+
type: none
1556+
device: ${DOCKER_VOLUME_BASE_PATH}/data/mysql-84
1557+
o: bind
1558+
config_mysql_84_etc:
1559+
driver: local
1560+
driver_opts:
1561+
type: none
1562+
device: ${DOCKER_VOLUME_BASE_PATH}/config/mysql-84/etc
1563+
o: bind
15321564
data_percona_57:
15331565
driver: local
15341566
driver_opts:

docker/mysql-84/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM sandstein/mysql:8.4
2+
3+
ARG USER_ID=999
4+
ARG GROUP_ID=999
5+
RUN modify-user-ids mysql ${USER_ID} ${GROUP_ID}

0 commit comments

Comments
 (0)