#tradewind:fix nginx & zip
This commit is contained in:
parent
00ee0c8605
commit
73e3fc7391
@ -14,7 +14,7 @@ services:
|
||||
- ./nginx/sources.list:/etc/apt/sources.list
|
||||
- ${LOCAL_CODE_ROOT}:/var/www/http
|
||||
- ./log/nginx:/var/log/nginx
|
||||
container_name: nginx-server
|
||||
container_name: nginx
|
||||
restart: always
|
||||
php7.4:
|
||||
build:
|
||||
@ -25,22 +25,19 @@ services:
|
||||
- ${LOCAL_CODE_ROOT}:/var/www/http
|
||||
networks:
|
||||
- server
|
||||
container_name: php7.4
|
||||
container_name: php74
|
||||
ports:
|
||||
- 9000:9000
|
||||
restart: always
|
||||
mysql: # 添加 mysql 服务
|
||||
mysql:
|
||||
build:
|
||||
context: mysql/
|
||||
dockerfile: dockerfile
|
||||
restart: always
|
||||
environment:
|
||||
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
|
||||
# volumes:
|
||||
# - ${MYSQL_DATA_PATH}:/var/lib/mysql
|
||||
# platform: linux/amd64 # apple silicon
|
||||
networks:
|
||||
- server
|
||||
ports:
|
||||
|
@ -1,18 +1,19 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name example.com;
|
||||
root /var/www/http/example;
|
||||
location / {
|
||||
index index.php index.html error/index.html;
|
||||
autoindex off;
|
||||
}
|
||||
location ~ \.php(.*)$ {
|
||||
fastcgi_pass php7.4:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
|
||||
include fastcgi_params;
|
||||
listen 80;
|
||||
server_name example.com;
|
||||
root /var/www/http/example;
|
||||
index index.php;
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass php7.4:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
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 \
|
||||
postgresql-dev \
|
||||
sqlite-dev \
|
||||
libzip-dev \
|
||||
&& apk add --no-cache \
|
||||
curl \
|
||||
git \
|
||||
@ -20,6 +19,7 @@ RUN apk add --no-cache --virtual .build-deps \
|
||||
mysql-client \
|
||||
postgresql-libs \
|
||||
openssl \
|
||||
libzip-dev \
|
||||
&& pecl install imagick \
|
||||
&& docker-php-ext-enable imagick \
|
||||
&& pecl install xdebug-3.0.4 \
|
||||
|
Loading…
x
Reference in New Issue
Block a user