php_with_node #3

Merged
Hide_D merged 2 commits from php_with_node into master 2021-09-09 23:33:10 +09:00
4 changed files with 79 additions and 5 deletions
+7 -2
View File
@@ -1,4 +1,4 @@
FROM php:8.0-fpm-buster FROM php:8.0-fpm-bullseye
#debian #debian
ENV LC_ALL=C.UTF-8 ENV LC_ALL=C.UTF-8
@@ -8,7 +8,7 @@ RUN apt -y update ;\
bzip2 git rsync \ bzip2 git rsync \
libmemcached-dev libcurl4-openssl-dev libmcrypt-dev \ libmemcached-dev libcurl4-openssl-dev libmcrypt-dev \
libicu-dev libjpeg-dev libpng-dev libwebp-dev libfreetype6-dev \ libicu-dev libjpeg-dev libpng-dev libwebp-dev libfreetype6-dev \
libzip-dev libxml2-dev libsqlite3-dev gosu; libzip-dev libxml2-dev libsqlite3-dev gosu build-essential;
RUN debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ RUN debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr; \ docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr; \
@@ -24,6 +24,11 @@ RUN debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
mysqli \ mysqli \
zip; zip;
RUN pecl install memcached mcrypt; RUN pecl install memcached mcrypt;
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
apt install -yq nodejs
RUN npm install -g npm
#from nextcloud setting #from nextcloud setting
RUN mkdir -p /var/www/html/; \ RUN mkdir -p /var/www/html/; \
mkdir -p /var/www/.ssh; mkdir -p /var/www/.ssh;
+2 -2
View File
@@ -1,4 +1,4 @@
FROM php:7.4-fpm-buster FROM php:7.4-fpm-bullseye
#debian #debian
ENV LC_ALL=C.UTF-8 ENV LC_ALL=C.UTF-8
@@ -8,7 +8,7 @@ RUN apt -y update ;\
bzip2 git rsync \ bzip2 git rsync \
libmemcached-dev libcurl4-openssl-dev libmcrypt-dev \ libmemcached-dev libcurl4-openssl-dev libmcrypt-dev \
libicu-dev libjpeg-dev libpng-dev libwebp-dev libfreetype6-dev \ libicu-dev libjpeg-dev libpng-dev libwebp-dev libfreetype6-dev \
libzip-dev libxml2-dev libsqlite3-dev gosu; libzip-dev libxml2-dev libsqlite3-dev gosu build-essential;
RUN debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ RUN debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr; \ docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr; \
@@ -0,0 +1,68 @@
version: '3.2'
services:
db:
ports:
- 3306:3306
#For DEV. Expose MySQL port
volumes:
- type: bind
source: ~/dev_sam/db
target: /var/lib/mysql
web:
build:
args:
UID: 1000
GID: 1000
#For DEV. Set UID of www-data as first local user
ports:
- 8084:80
#For DEV. Export Web port.
volumes:
- type: bind
source: ~/dev_sam/app
target: /var/www/html
#For DEV. Set app path as local directory
- type: bind
source: ~/dev_sam/bbs
target: /var/www/board
app:
build:
args:
UID: 1000
GID: 1000
volumes:
- type: bind
source: ~/dev_sam/app
target: /var/www/html
board:
build:
args:
UID: 1000
GID: 1000
volumes:
- type: bind
source: ~/dev_sam/board
target: /var/www/board
install:
volumes:
- type: bind
source: ~/dev_sam/app
target: /var/www/html
cron:
build: ./cron
restart: "no"
#For DEV. Disable cron
entrypoint: ["echo", "Service cron disabled"]
volumes:
- type: bind
source: ~/dev_sam/app
target: /var/www/html
depends_on:
- app
+2 -1
View File
@@ -32,13 +32,14 @@ server {
location / { location / {
location ~ \.php$ { location ~ \.php$ {
include fastcgi_params; include fastcgi_params;
proxy_read_timeout 600;
fastcgi_pass app:9000; fastcgi_pass app:9000;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
} }
} }
# deny access to .htaccess files, if Apache's document root # deny access to .htaccess files, if Apache's document root
# concurs with nginx's one # concurs with nginx's one