forked from LiveCarta/LiveCartaWP
@@ -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
13
devops/entrypoint.sh
Normal 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 "$@"
|
||||
Reference in New Issue
Block a user