-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.production
46 lines (32 loc) · 1.25 KB
/
Dockerfile.production
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
FROM ubuntu:lunar
EXPOSE 80
ENV NR_PHP_AGENT_URL 'https://download.newrelic.com/php_agent/archive/10.9.0.324/newrelic-php5-10.9.0.324-linux.tar.gz'
ENV INSTALL_GHOSTSCRIPT true
ENV PHP_UPLOAD_MAX_FILESIZE '256M'
ENV PHP_POST_MAX_SIZE '384M'
ENV PHP_MEMORY_LIMIT '512M'
ENV PHP_MAX_EXECUTION_TIME '240'
# The "Hardening WordPress" article at https://wordpress.org/documentation/article/hardening-wordpress/
# recommends 755 and 644.
ENV FILE_OWNER 'wp-services'
ENV FILE_GROUP 'www-data'
ENV FILE_MODE 0644
ENV DIRECTORY_MODE 0644
RUN useradd wp-services -r -m --shell=/bin/false --uid=699
ENV DEBIAN_FRONTEND=noninteractive
# Install PHP and related packages, plus locales
COPY ./bin/install_packages.sh /root/install_packages.sh
RUN bash /root/install_packages.sh
ENV LANG en_US.utf8
# Install Ghostscript
COPY ./bin/install_ghostscript.sh /root/install_ghostscript.sh
RUN if [ $INSTALL_GHOSTSCRIPT ]; then bash /root/install_ghostscript.sh; fi
# Copy over our nginx site config
COPY ./nginx_config/default_site /etc/nginx/sites-enabled/default
# Run further nginx configurations
COPY bin/configure_nginx.sh /root/configure_nginx.sh
RUN /root/configure_nginx.sh
WORKDIR /var/www/html
COPY mu-plugins/ /root/mu-plugins/
COPY bin/* /root/
ENTRYPOINT /root/entrypoint.sh