создана репа с докером для ларавел
This commit is contained in:
6
docker/mysql/Dockerfile
Normal file
6
docker/mysql/Dockerfile
Normal file
@@ -0,0 +1,6 @@
|
||||
FROM mysql:8.0.16
|
||||
|
||||
COPY my.cnf /etc/mysql/conf.d/my.cnf
|
||||
CMD ["mysqld"]
|
||||
|
||||
EXPOSE 3306
|
||||
10
docker/mysql/my.cnf
Normal file
10
docker/mysql/my.cnf
Normal file
@@ -0,0 +1,10 @@
|
||||
# The MySQL Client configuration file.
|
||||
#
|
||||
# For explanations see
|
||||
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
|
||||
|
||||
[mysql]
|
||||
|
||||
[mysqld]
|
||||
sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
|
||||
default-authentication-plugin=mysql_native_password
|
||||
1
docker/nginx/Dockerfile
Normal file
1
docker/nginx/Dockerfile
Normal file
@@ -0,0 +1 @@
|
||||
FROM nginx:stable-alpine
|
||||
22
docker/nginx/default.cnf
Normal file
22
docker/nginx/default.cnf
Normal file
@@ -0,0 +1,22 @@
|
||||
server {
|
||||
listen 80;
|
||||
index index.php index.html;
|
||||
server_name localhost;
|
||||
error_log /var/log/nginx/error.log;
|
||||
access_log /var/log/nginx/access.log;
|
||||
root /var/www/public;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass php:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
}
|
||||
}
|
||||
22
docker/nginx/default.conf
Normal file
22
docker/nginx/default.conf
Normal file
@@ -0,0 +1,22 @@
|
||||
server {
|
||||
listen 80;
|
||||
index index.php index.html;
|
||||
server_name localhost;
|
||||
error_log /var/log/nginx/error.log;
|
||||
access_log /var/log/nginx/access.log;
|
||||
root /var/www/public;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass php:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
}
|
||||
}
|
||||
8
docker/php-fpm/Dockerfile
Normal file
8
docker/php-fpm/Dockerfile
Normal file
@@ -0,0 +1,8 @@
|
||||
FROM php:8.1-fpm-alpine
|
||||
|
||||
RUN apk update && apk upgrade
|
||||
|
||||
# Install the PHP pdo_mysql extention
|
||||
RUN docker-php-ext-install pdo pdo_mysql
|
||||
|
||||
WORKDIR /var/www
|
||||
Reference in New Issue
Block a user