Commit bd5c9b28 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Merge branch 'develop'

parents 2231c6b5 7021fd51
Loading
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ FROM unicaen-dev-php${PHP_VERSION}-apache

LABEL maintainer="Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>"

WORKDIR /app
WORKDIR /var/www/html

ENV APACHE_CONF_DIR=/etc/apache2 \
    PHP_CONF_DIR=/etc/php/${PHP_VERSION}
@@ -23,11 +23,9 @@ RUN ln -sf /dev/stdout /var/log/apache2/other_vhosts_access.log
RUN ln -sf /dev/stderr /var/log/apache2/error.log

# Configuration Apache et FPM
ADD docker/apache-ports.conf    ${APACHE_CONF_DIR}/ports.conf
ADD docker/apache-site.conf     ${APACHE_CONF_DIR}/sites-available/app.conf
ADD docker/apache-site-ssl.conf ${APACHE_CONF_DIR}/sites-available/app-ssl.conf
ADD docker/fpm/pool.d/app.conf  ${PHP_CONF_DIR}/fpm/pool.d/app.conf
ADD docker/fpm/conf.d/app.ini   ${PHP_CONF_DIR}/fpm/conf.d/app.ini
ADD docker/apache/000-default.conf ${APACHE_CONF_DIR}/sites-available/
ADD docker/php/fpm/conf.d/*.ini ${PHP_CONF_DIR}/fpm/conf.d/
ADD docker/php/cli/conf.d/*.ini ${PHP_CONF_DIR}/cli/conf.d/

RUN a2ensite app app-ssl && \
RUN a2enconf php${PHP_VERSION}-fpm.conf && \
    service php${PHP_VERSION}-fpm reload
+2 −2
Original line number Diff line number Diff line
@@ -12,8 +12,8 @@ services:
     - "8080:80"
     - "8443:443"
    volumes:
     - .:/app
    working_dir: /app
     - .:/var/www/html
    working_dir: /var/www/html

  db:
    image: postgres

docker/apache-ports.conf

deleted100644 → 0
+0 −2
Original line number Diff line number Diff line
Listen 80
Listen 443

docker/apache-site-ssl.conf

deleted100644 → 0
+0 −30
Original line number Diff line number Diff line
<VirtualHost *:443>
     ServerName localhost
     DocumentRoot /app/public

     SetEnv APPLICATION_ENV "development"

     RewriteEngine On

     <Directory /app/public>
         DirectoryIndex index.php
         AllowOverride All
         Require all granted
     </Directory>

    <IfModule proxy_fcgi_module>
        <FilesMatch ".+\.ph(ar|p|tml)$">
            SetHandler "proxy:unix:/var/run/php7.0-fpm-webapp.sock|fcgi://localhost/"
        </FilesMatch>
    </IfModule>

     SSLEngine on
     SSLCertificateFile	/etc/ssl/certs/ssl-cert-snakeoil.pem
     SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

     Header always set Strict-Transport-Security "max-age=15768000; includeSubdomains;"

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined
     #LogLevel debug
</VirtualHost>

docker/apache-site.conf

deleted100644 → 0
+0 −13
Original line number Diff line number Diff line
<VirtualHost *:80>
     ServerName localhost
     DocumentRoot /app/public

     RewriteEngine On

     Header always set Strict-Transport-Security "max-age=15768000; includeSubdomains;"

     ### Redirection en HTTPS
     RewriteCond %{SERVER_PORT} !^443$
     RewriteRule ^/(.*) https://%{SERVER_NAME}:443/$1 [L,R]

</VirtualHost>
 No newline at end of file
Loading