#tradewind:add php71 node
This commit is contained in:
parent
9f308af6b0
commit
804eb5544f
@ -1 +1,2 @@
|
||||
LOCAL_CODE_ROOT=/var/www/http
|
||||
LOCAL_CODE_ROOT=/Users/tradewind/Projects
|
||||
PROJECT_PATH=/Users/tradewind/Projects/example
|
||||
|
@ -6,7 +6,7 @@ services:
|
||||
context: ./nginx/
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- 80:80
|
||||
- "80:80"
|
||||
networks:
|
||||
- server
|
||||
volumes:
|
||||
@ -16,18 +16,36 @@ services:
|
||||
- ./log/nginx:/var/log/nginx
|
||||
container_name: nginx
|
||||
restart: always
|
||||
php71:
|
||||
build:
|
||||
context: ./php7.1/
|
||||
dockerfile: dockerfile
|
||||
# args:
|
||||
# PROJECT_PATH: ${PROJECT_PATH:-/opt/project}
|
||||
volumes:
|
||||
- ./php7.1/sources.list:/etc/apt/sources.list
|
||||
- ./php7.1/docker-php-ext-xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||
- ./php7.1/php.ini:/usr/local/etc/php/php.ini
|
||||
- ${LOCAL_CODE_ROOT}:/var/www/http
|
||||
- ${PROJECT_PATH}:/opt/project # fix idea+python中xdebug项目路径
|
||||
networks:
|
||||
- server
|
||||
container_name: php71
|
||||
restart: always
|
||||
php74:
|
||||
build:
|
||||
context: ./php7.4/
|
||||
dockerfile: dockerfile
|
||||
# args:
|
||||
# PROJECT_PATH: ${PROJECT_PATH:-/opt/project}
|
||||
volumes:
|
||||
- ./php7.4/sources.list:/etc/apt/sources.list
|
||||
- ./php7.4/docker-php-ext-xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||
- ./php7.4/php.ini:/usr/local/etc/php/php.ini
|
||||
- ${LOCAL_CODE_ROOT}:/var/www/http
|
||||
networks:
|
||||
- server
|
||||
container_name: php74
|
||||
ports:
|
||||
- 9000:9000
|
||||
restart: always
|
||||
mysql:
|
||||
build:
|
||||
@ -41,7 +59,7 @@ services:
|
||||
networks:
|
||||
- server
|
||||
ports:
|
||||
- 3306:3306
|
||||
- "3306:3306"
|
||||
container_name: mysql
|
||||
redis:
|
||||
build:
|
||||
@ -53,11 +71,11 @@ services:
|
||||
# volumes:
|
||||
# - ${REDIS_DATA_PATH}:/data
|
||||
ports:
|
||||
- 6379:6379
|
||||
- "6379:6379"
|
||||
container_name: redis
|
||||
python:
|
||||
build:
|
||||
context: ./
|
||||
context: ./python/
|
||||
dockerfile: dockerfile
|
||||
volumes:
|
||||
- ${LOCAL_CODE_ROOT}:/code
|
||||
@ -65,6 +83,18 @@ services:
|
||||
- server
|
||||
container_name: python
|
||||
ports:
|
||||
- 8000:8000
|
||||
- "8000:8000"
|
||||
node:
|
||||
build:
|
||||
context: ./node/
|
||||
dockerfile: dockerfile
|
||||
volumes:
|
||||
- ${LOCAL_CODE_ROOT}:/code
|
||||
networks:
|
||||
- server
|
||||
stdin_open: true # docker run -i
|
||||
tty: true # docker run -t
|
||||
ipc: host
|
||||
container_name: node
|
||||
networks:
|
||||
server:
|
@ -8,7 +8,7 @@ server {
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass php74:9000;
|
||||
fastcgi_pass php71:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
19
node/dockerfile
Normal file
19
node/dockerfile
Normal file
@ -0,0 +1,19 @@
|
||||
FROM node:latest
|
||||
|
||||
RUN sed -i "s@http://deb.debian.org@http://mirrors.aliyun.com@g" /etc/apt/sources.list
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libgtkextra-dev \
|
||||
libgconf2-dev \
|
||||
libnss3 \
|
||||
libasound2 \
|
||||
libxtst-dev \
|
||||
libxss1 \
|
||||
libatk-bridge2.0-0 \
|
||||
libgtk-3.0 \
|
||||
libgbm-dev \
|
||||
&& apt-get clean \
|
||||
&& apt-get autoclean
|
||||
|
||||
RUN npm install -g electron
|
||||
|
5
php7.1/docker-php-ext-xdebug.ini
Normal file
5
php7.1/docker-php-ext-xdebug.ini
Normal file
@ -0,0 +1,5 @@
|
||||
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so
|
||||
xdebug.mode=debug
|
||||
xdebug.client_host=host.docker.internal
|
||||
xdebug.client_port=9003
|
||||
xdebug.idekey=PHPSTORM
|
48
php7.1/dockerfile
Normal file
48
php7.1/dockerfile
Normal file
@ -0,0 +1,48 @@
|
||||
FROM php:7.1-fpm
|
||||
|
||||
#ARG PROJECT_PATH
|
||||
#WORKDIR ${PROJECT_PATH}
|
||||
|
||||
WORKDIR /opt/project
|
||||
|
||||
RUN sed -i "s@http://deb.debian.org@http://mirrors.tencent.com@g" /etc/apt/sources.list
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git \
|
||||
zip \
|
||||
unzip \
|
||||
libpq-dev \
|
||||
libzip-dev \
|
||||
libpng-dev \
|
||||
libfreetype6-dev \
|
||||
libxml2-dev \
|
||||
libicu-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
&& docker-php-ext-configure intl \
|
||||
&& docker-php-ext-configure pcntl --enable-pcntl \
|
||||
&& docker-php-ext-install -j$(nproc) \
|
||||
bcmath \
|
||||
pdo_mysql \
|
||||
pdo_pgsql \
|
||||
gd \
|
||||
zip \
|
||||
exif \
|
||||
sockets \
|
||||
intl \
|
||||
soap \
|
||||
pcntl \
|
||||
&& pecl install \
|
||||
redis \
|
||||
xdebug-2.9.8 \
|
||||
# mongodb \
|
||||
&& docker-php-ext-enable \
|
||||
redis \
|
||||
xdebug \
|
||||
# mongodb \
|
||||
&& apt-get clean \
|
||||
&& apt-get autoclean
|
||||
|
||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
|
||||
# 修改 composer 为国内镜像
|
||||
RUN composer config -g repo.packagist composer https://mirrors.cloud.tencent.com/composer/
|
1947
php7.1/php.ini
Normal file
1947
php7.1/php.ini
Normal file
File diff suppressed because it is too large
Load Diff
10
php7.1/sources.list
Normal file
10
php7.1/sources.list
Normal file
@ -0,0 +1,10 @@
|
||||
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
|
||||
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
|
||||
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
|
||||
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
|
||||
|
||||
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
|
||||
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
|
||||
|
||||
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
|
||||
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
|
5
php7.4/docker-php-ext-xdebug.ini
Normal file
5
php7.4/docker-php-ext-xdebug.ini
Normal file
@ -0,0 +1,5 @@
|
||||
zend_extension=xdebug
|
||||
xdebug.mode=debug
|
||||
xdebug.client_host=host.docker.internal
|
||||
xdebug.client_port=9003
|
||||
xdebug.idekey=PHPSTORM
|
@ -1,5 +1,9 @@
|
||||
FROM php:7.4-fpm
|
||||
|
||||
ARG PROJECT_PATH
|
||||
|
||||
WORKDIR ${PROJECT_PATH}
|
||||
|
||||
RUN sed -i "s@http://deb.debian.org@http://mirrors.aliyun.com@g" /etc/apt/sources.list
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
@ -14,6 +18,7 @@ RUN apt-get update && apt-get install -y \
|
||||
libicu-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
&& docker-php-ext-configure intl \
|
||||
&& docker-php-ext-configure pcntl --enable-pcntl \
|
||||
&& docker-php-ext-install -j$(nproc) \
|
||||
bcmath \
|
||||
pdo_mysql \
|
||||
@ -24,14 +29,15 @@ RUN apt-get update && apt-get install -y \
|
||||
sockets \
|
||||
intl \
|
||||
soap \
|
||||
pcntl \
|
||||
&& pecl install \
|
||||
redis \
|
||||
xdebug \
|
||||
mongodb \
|
||||
xdebug-3.1.6 \
|
||||
# mongodb \
|
||||
&& docker-php-ext-enable \
|
||||
redis \
|
||||
xdebug \
|
||||
mongodb \
|
||||
# mongodb \
|
||||
&& apt-get clean \
|
||||
&& apt-get autoclean
|
||||
|
||||
|
1947
php7.4/php.ini
Normal file
1947
php7.4/php.ini
Normal file
File diff suppressed because it is too large
Load Diff
1947
php7.4/php.ini-dev
Normal file
1947
php7.4/php.ini-dev
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user