daily pastebin goal
27%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 106 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. FROM centos:centos7
  3.  
  4. ENV WP_VERSION=4.9.8 \
  5.     PHP_VERSION=72 \
  6.     WP_ROOT_DIR=/usr/share/nginx/html \
  7.     AS3CFPRO_LICENCE=temp \
  8.     AS3CF_AWS_ACCESS_KEY_ID=temp \
  9.     AS3CF_AWS_SECRET_ACCESS_KEY=temp \
  10.     DB_NAME=temp \
  11.     DB_USER=temp \
  12.     DB_PASSWORD=temp \
  13.     DB_HOST=temp \
  14.     ENV_TAG=temp \
  15.     S3_OFFLOAD_KEY=temp \
  16.     S3_BUCKET_SECRET=temp \
  17.     S3_BUCKET_ACCESS=temp \
  18.     NEWRELIC_KEY=temp \
  19.     SITE_NAME=temp \
  20.     SITE_ENV=temp
  21.  
  22. RUN yum -y update \
  23.     && yum -y install epel-release yum-utils \
  24.     && yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm \
  25.     && yum -y install http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm \
  26.     && yum-config-manager --enable remi-php${PHP_VERSION} \
  27.     && yum install -y newrelic-php5 supervisor nginx pwgen python-setuptools git unzip \
  28.       php${PHP_VERSION}-php-fpm php${PHP_VERSION}-php-cli php${PHP_VERSION}-php-mysql php${PHP_VERSION}-php-gd \
  29.       php${PHP_VERSION}-php-imap php${PHP_VERSION}-php-ldap php${PHP_VERSION}-php-odbc php${PHP_VERSION}-php-pear \
  30.       php${PHP_VERSION}-php-xml php${PHP_VERSION}-php-xmlrpc php${PHP_VERSION}-php-magickwand php${PHP_VERSION}-php-mbstring \
  31.       php${PHP_VERSION}-php-magpierss php${PHP_VERSION}-php-shout php${PHP_VERSION}-php-mcrypt php${PHP_VERSION}-php-snmp \
  32.       php${PHP_VERSION}-php-apc php${PHP_VERSION}-php-soap php${PHP_VERSION}-php-tidy php${PHP_VERSION}-php-pecl-apcu \
  33.       php${PHP_VERSION}-php-mcrypt php${PHP_VERSION}-php-mssql php${PHP_VERSION}-php-pecl-redis  \
  34.     && easy_install supervisor-stdout \
  35.     && ln -sfF /opt/remi/php${PHP_VERSION}/enable /etc/profile.d/php70-paths.sh \
  36.     && ln -sfF /opt/remi/php${PHP_VERSION}/root/usr/bin/php${PHP_VERSION} /usr/local/bin/php \
  37.     && ln -sfF /etc/opt/remi/php${PHP_VERSION}/php.ini /etc/php.ini \
  38.     && ln -s /etc/opt/remi/php${PHP_VERSION}/php.d /etc/php.d \
  39.     && curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
  40.     && chmod +x wp-cli.phar \
  41.     && mv wp-cli.phar /usr/local/bin/wp \
  42.     && rm -rf /usr/share/nginx/html/* /var/yum/cache/*
  43.  
  44. WORKDIR ${WP_ROOT_DIR}
  45.  
  46. ADD https://wordpress.org/wordpress-${WP_VERSION}.zip .
  47. ADD plugins/s3-extension.zip /tmp
  48. ADD plugins/wp-offload-s3-1.7.2.zip /tmp/
  49. ADD plugins/wp-amazon-s3-and-cloudfront-tweaks-master.zip /tmp/
  50. COPY configs/setup-wp.sh /usr/bin/setup-wp.sh
  51. COPY configs/nginx.conf /etc/nginx/nginx.conf
  52. COPY configs/wordpress-fpm.conf /etc/opt/remi/php${PHP_VERSION}/php-fpm.d/www.conf
  53. COPY configs/supervisord.conf /etc/supervisord.conf
  54. COPY configs/wp-config.php ${WP_ROOT_DIR}
  55.  
  56. RUN unzip wordpress-${WP_VERSION}.zip \
  57.     &&  mv wordpress/* ${WP_ROOT_DIR}/ \
  58.     &&  chmod +x /usr/bin/setup-wp.sh \
  59.     &&  touch /var/log/wp.log \
  60.     &&  chown nginx /var/log/wp.log \
  61.     &&  sh /usr/bin/setup-wp.sh \
  62.     &&  chown -R nginx:nginx /usr/share/nginx/html /var/log/nginx/ \
  63.     && cp -vfp /usr/lib/newrelic-php5/agent/x64/newrelic-20170718.so /opt/remi/php${PHP_VERSION}/root/usr/lib64/php/modules/newrelic.so \
  64.     &&  rm -rf /var/yum/cache/* *.zip wordpress \
  65.     && mkdir -p /var/log/php-fpm \
  66.     && touch /var/log/php-fpm/error.log \
  67.     && chown -R nginx:nginx /var/log/php-fpm
  68.  
  69. RUN export NR_INSTALL_USE_CP_NOT_LN=1 \
  70.     && NR_INSTALL_SILENT=1 \
  71.     && /usr/bin/newrelic-install install
  72.  
  73.   #  && sed -i -e 's/"REPLACE_WITH_REAL_KEY"/"293bf09a926239c52045cb2f3298918354e6259b"/'\
  74.   #     -e 's/newrelic.appname = "PHP Application"/newrelic.appname = "${SITE_NAME}"/'\
  75.   #     /etc/opt/remi/php72/php.d/newrelic.ini
  76.  
  77.  
  78. EXPOSE 80
  79.  
  80. CMD ["/usr/bin/supervisord"]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top