diff --git a/README.md b/README.md index a7a11e0..6116fca 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ The container doesn't automatically run `drush site-install` because we want it `docker-compose exec php composer run-script install:with-mysql` +Environment configuration used by the install script is described in `.env`. + # Persistence Persistent state is stored in a database volume named `data`. You can destroy and recreate the containers as much as you like and your site will be preserved until you also destroy the volume. diff --git a/database/Dockerfile b/database/Dockerfile index 80f3d90..8e1fa26 100644 --- a/database/Dockerfile +++ b/database/Dockerfile @@ -1,6 +1,6 @@ FROM amazeeio/centos:7 -ENV MARIADB_VERSION=10.1 +ENV MARIADB_VERSION=10.3 RUN { \ echo '[mariadb]'; \ diff --git a/docker-compose.yml b/docker-compose.yml index 377f430..2d5c3eb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,8 +3,7 @@ services: nginx: build: ./nginx ports: - - "80:80" - - "443:443" + - "80:8080" networks: - contenta volumes: @@ -15,27 +14,26 @@ services: - php php: build: ./php - ports: - - "9000:9000" volumes: - ./www:/var/www:cached env_file: - .env networks: - contenta + - contenta_internal + depends_on: [database] database: build: ./database - ports: - - "3306:3306" volumes: - data:/var/lib/mysql env_file: - .env networks: - - contenta + - contenta_internal volumes: data: networks: contenta: + contenta_internal: diff --git a/nginx/Dockerfile b/nginx/Dockerfile index 9eb2d1c..05ee4b5 100644 --- a/nginx/Dockerfile +++ b/nginx/Dockerfile @@ -1,5 +1,15 @@ -FROM amazeeio/centos7-nginx:1.10 +FROM amazeeio/centos:7 -COPY conf/drupal.conf /etc/nginx/sites/drupal.conf +RUN yum install -y epel-release \ + yum check-update \ + yum update -y +RUN yum install -y nginx \ + yum clean all + +EXPOSE 8080 +COPY conf/drupal.conf /etc/nginx/conf.d/default.conf RUN fix-permissions /etc/nginx +RUN curl -sLo /usr/local/bin/ep https://github.com/kreuzwerker/envplate/releases/download/v0.0.8/ep-linux && chmod +x /usr/local/bin/ep + +CMD [ "/usr/local/bin/ep", "-v", "/etc/nginx/conf.d/default.conf", "--", "/usr/sbin/nginx", "-g", "daemon off;" ] diff --git a/nginx/conf/drupal.conf b/nginx/conf/drupal.conf index ea5cd29..b29e98f 100644 --- a/nginx/conf/drupal.conf +++ b/nginx/conf/drupal.conf @@ -1,5 +1,6 @@ server { - listen 80; + listen 8080 default_server; + listen [::]:8080 default_server; fastcgi_keep_conn on; root /var/www/web; diff --git a/php/Dockerfile b/php/Dockerfile index 8d5bb3a..2056b10 100644 --- a/php/Dockerfile +++ b/php/Dockerfile @@ -4,7 +4,7 @@ FROM amazeeio/centos:7 RUN yum install -y epel-release \ http://rpms.remirepo.net/enterprise/remi-release-7.rpm \ yum-utils && \ - yum-config-manager --enable remi-php71 && \ + yum-config-manager --enable remi-php74 && \ yum update -y && \ yum install -y \ php-bcmath \ @@ -22,6 +22,7 @@ RUN yum install -y epel-release \ php-opcache \ php-pcntl \ php-pdo \ + php-zip \ php-pecl-apcu \ php-pecl-apcu-bc \ php-pecl-geoip \ @@ -39,7 +40,7 @@ RUN yum install -y epel-release \ yum clean all # Install Composer -ENV COMPOSER_VERSION 1.9.0 +ENV COMPOSER_VERSION 1.10.20 RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=${COMPOSER_VERSION} && \ chmod +x /usr/local/bin/composer && \ composer global require "hirak/prestissimo:^0.3" && \