-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
59 lines (43 loc) · 1.37 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
FROM alpine:3.15
RUN apk add \
curl \
nginx \
\
php7 php7-fpm \
php7-opcache php7-session php7-mysqli \
php7-phar php7-iconv php7-json \
\
# development purpose \
nano
# NGINX
######################################################################
# Setup NGINX App config
COPY config/nginx.app.conf /etc/nginx/http.d/default.conf
# PHP
######################################################################
# Create symlink so programs depending on `php` still function
RUN ln -s /usr/sbin/php-fpm7 /usr/sbin/php-fpm
# Configure PHP-FPM
COPY config/fpm-pool.conf /etc/php7/php-fpm.d/www.conf
# Preparation
######################################################################
# Prepare Directory
RUN mkdir -p \
/run/nginx \
/app
# Change PATH
WORKDIR /app
# Composer
######################################################################
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Install Composer Dependency
#COPY composer.json composer.lock ./
#RUN composer install --working-dir=. --prefer-dist --no-scripts --no-dev && rm -rf /root/.composer
# ADD Project Files
COPY htdocs/ .
# start nginx & php-fpm
COPY config/start.sh /
CMD sh /start.sh
# Configure a healthcheck to validate that everything is up & running
HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1:80/fpm-ping