Commit 6dd5995b authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Fin de la dockerisation

parent be09d612
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ ADD docker/php.conf ${PHP_CONF_DIR}/fpm/conf.d/ose.ini
ADD docker/apache-ports.conf    ${APACHE_CONF_DIR}/ports.conf
ADD docker/apache-site.conf     ${APACHE_CONF_DIR}/sites-available/ose.conf
ADD docker/apache-site-ssl.conf ${APACHE_CONF_DIR}/sites-available/ose-ssl.conf
#ADD docker/fpm/pool.d/app.conf  ${PHP_CONF_DIR}/fpm/pool.d/ose.conf
ADD docker/fpm/pool.d/app.conf  ${PHP_CONF_DIR}/fpm/pool.d/ose.conf

RUN a2ensite ose ose-ssl && \
    service php7.0-fpm reload
+2 −3
Original line number Diff line number Diff line
version: '2'

services:
  octopus:
  ose:
    container_name: ose-container
    build:
      context: .
      dockerfile: Dockerfile
    ports:
    - "8080:80"
    - "8443:8443"
    - "8443:443"
    volumes:
    - .:/var/www/ose
    - /tmp:/tmp
    working_dir: /var/www/ose
+1 −1
Original line number Diff line number Diff line
Listen 80
Listen 8443
 No newline at end of file
Listen 443
+30 −17
Original line number Diff line number Diff line
<VirtualHost *:8443>
    ServerName ose.localhost
    #ServerAlias octopass.localhost
<VirtualHost *:443>
     ServerName localhost
     DocumentRoot /var/www/ose/public

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

     SetEnv APPLICATION_ENV "development"

     RewriteEngine On

     <Directory /var/www/ose/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-ose.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>
+10 −15
Original line number Diff line number Diff line
<VirtualHost *:80>
    ServerName ose.localhost
    ServerAlias ose.localhost
     ServerName localhost
     DocumentRoot /var/www/ose/public

    SetEnv APPLICATION_ENV "development"
    <Directory /var/www/ose/public>
         DirectoryIndex index.php
         AllowOverride All
         Require all granted
    </Directory>
     RewriteEngine On

    <IfModule mod_rewrite.c>
        RewriteEngine on
        RewriteCond %{HTTPS} !=on
        RewriteRule ^(.*)?$ https://%{SERVER_NAME}:8443$1 [R=301,L]
    </IfModule>
     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>
Loading