This commit is contained in:
ekazak
2022-10-05 18:11:33 +02:00
parent 553ad65689
commit e919d1043f
2 changed files with 21 additions and 7 deletions

View File

@@ -9,13 +9,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr --with-freetype-dir=/usr/include \
&& docker-php-ext-install gd
# Install composer
RUN curl -sS https://getcomposer.org/installer | php -- \
--filename=composer \
--install-dir=/usr/local/bin && \
echo "alias composer='composer'" >> /root/.bashrc && \
composer
# php configs
COPY www.conf /usr/local/etc/php-fpm.d/www.conf
COPY docker-php.ini /usr/local/etc/php/conf.d/docker-php.ini
@@ -25,6 +18,14 @@ RUN apt-get install -y nginx
# nginx configs
COPY nginx /etc/nginx
# source code
COPY htdocs /var/www
COPY entrypoint.sh /entrypoint.sh
WORKDIR /var/www
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
ENTRYPOINT ["/entrypoint.sh"]

13
devops/entrypoint.sh Normal file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
printf "\n\nStarting PHP daemon...\n\n"
php-fpm --daemonize
printf "Starting Nginx...\n\n"
set -e
if [[ "$1" == -* ]]; then
set -- nginx -g daemon off; "$@"
fi
exec "$@"