#tradewind:fix nginx & zip
This commit is contained in:
@ -14,7 +14,7 @@ services:
|
|||||||
- ./nginx/sources.list:/etc/apt/sources.list
|
- ./nginx/sources.list:/etc/apt/sources.list
|
||||||
- ${LOCAL_CODE_ROOT}:/var/www/http
|
- ${LOCAL_CODE_ROOT}:/var/www/http
|
||||||
- ./log/nginx:/var/log/nginx
|
- ./log/nginx:/var/log/nginx
|
||||||
container_name: nginx-server
|
container_name: nginx
|
||||||
restart: always
|
restart: always
|
||||||
php7.4:
|
php7.4:
|
||||||
build:
|
build:
|
||||||
@ -25,22 +25,19 @@ services:
|
|||||||
- ${LOCAL_CODE_ROOT}:/var/www/http
|
- ${LOCAL_CODE_ROOT}:/var/www/http
|
||||||
networks:
|
networks:
|
||||||
- server
|
- server
|
||||||
container_name: php7.4
|
container_name: php74
|
||||||
ports:
|
ports:
|
||||||
- 9000:9000
|
- 9000:9000
|
||||||
restart: always
|
restart: always
|
||||||
mysql: # 添加 mysql 服务
|
mysql:
|
||||||
build:
|
build:
|
||||||
context: mysql/
|
context: mysql/
|
||||||
dockerfile: dockerfile
|
dockerfile: dockerfile
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: root
|
MYSQL_ROOT_PASSWORD: root
|
||||||
# command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci # 设置编码
|
|
||||||
# command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci #设置utf8字符集
|
|
||||||
command: --default-authentication-plugin=mysql_native_password
|
command: --default-authentication-plugin=mysql_native_password
|
||||||
# volumes:
|
# platform: linux/amd64 # apple silicon
|
||||||
# - ${MYSQL_DATA_PATH}:/var/lib/mysql
|
|
||||||
networks:
|
networks:
|
||||||
- server
|
- server
|
||||||
ports:
|
ports:
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name example.com;
|
server_name example.com;
|
||||||
root /var/www/http/example;
|
root /var/www/http/example;
|
||||||
location / {
|
index index.php;
|
||||||
index index.php index.html error/index.html;
|
location / {
|
||||||
autoindex off;
|
try_files $uri $uri/ /index.php?$query_string;
|
||||||
}
|
}
|
||||||
location ~ \.php(.*)$ {
|
|
||||||
fastcgi_pass php7.4:9000;
|
location ~ \.php$ {
|
||||||
fastcgi_index index.php;
|
fastcgi_pass php7.4:9000;
|
||||||
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
|
fastcgi_index index.php;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
|
||||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
include fastcgi_params;
|
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
|
||||||
|
include fastcgi_params;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,6 @@ RUN apk add --no-cache --virtual .build-deps \
|
|||||||
libxml2-dev \
|
libxml2-dev \
|
||||||
postgresql-dev \
|
postgresql-dev \
|
||||||
sqlite-dev \
|
sqlite-dev \
|
||||||
libzip-dev \
|
|
||||||
&& apk add --no-cache \
|
&& apk add --no-cache \
|
||||||
curl \
|
curl \
|
||||||
git \
|
git \
|
||||||
@ -20,6 +19,7 @@ RUN apk add --no-cache --virtual .build-deps \
|
|||||||
mysql-client \
|
mysql-client \
|
||||||
postgresql-libs \
|
postgresql-libs \
|
||||||
openssl \
|
openssl \
|
||||||
|
libzip-dev \
|
||||||
&& pecl install imagick \
|
&& pecl install imagick \
|
||||||
&& docker-php-ext-enable imagick \
|
&& docker-php-ext-enable imagick \
|
||||||
&& pecl install xdebug-3.0.4 \
|
&& pecl install xdebug-3.0.4 \
|
||||||
|
Reference in New Issue
Block a user