change dockerfile to able to copy app.php from configs

This commit is contained in:
einhornimmond 2021-02-17 20:07:22 +01:00
parent e4508f2be7
commit 4d2308eb8a
2 changed files with 8 additions and 13 deletions

View File

@ -1,17 +1,12 @@
FROM nginx FROM phpdockerio/php74-fpm
# install php fpm # install php fpm
RUN apt-get update \ RUN apt-get update \
&& apt-get -y --no-install-recommends install curl unzip php7.3-curl php7.3-fpm php7.3-mbstring php7.3-intl php7.3-xml php7.3-pdo php7.3-mysql \ && apt-get -y --no-install-recommends install curl unzip php7.4-curl php7.4-fpm php7.4-mbstring php7.4-intl php7.4-xml php7.4-pdo php7.4-mysql \
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* && apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
# install composer
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
WORKDIR /usr/share/nginx/html WORKDIR /var/www/cakephp
COPY . . COPY ./community_server/ .
COPY ./config/nginx/nginx.conf /etc/nginx/conf.d/default.conf COPY ./configs/community_server/app.php ./config/
COPY ./config/nginx/fastcgi.conf /etc/nginx/ RUN composer update
COPY ./config/nginx/mime.types /etc/nginx/
RUN composer update --no-scripts --no-autoloader

View File

@ -37,8 +37,8 @@ server {
fastcgi_index index.php; fastcgi_index index.php;
include fastcgi.conf; include fastcgi.conf;
fastcgi_pass unix:/run/php/php7.3-fpm.sock; #fastcgi_pass unix:/run/php/php7.3-fpm.sock;
#fastcgi_pass 127.0.0.1:9000; fastcgi_pass 127.0.0.1:9000;
} }