Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
open-source
sygal-import-ws
Commits
d8617313
Commit
d8617313
authored
Aug 28, 2018
by
Bertrand Gauthier
Browse files
Docker: corrections pour faire pareil que pour le projet sygal
parent
3db208b1
Changes
11
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
d8617313
###########################################################################################
#
# Image pour le dev.
#
# Montage des sources attendu dans le volume "/webapp" du container.
#
###########################################################################################
FROM
php:7
-apache
FROM
unicaen-dev-php7.0
-apache
LABEL
maintainer="Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>"
# Mise à niveau de la distrib et installation des packages requis.
RUN
apt-get update
&&
apt-get
install
-y
\
ghostscript
\
git
\
libaio1
\
libcurl4-openssl-dev
\
libfreetype6-dev
\
libicu-dev
\
libjpeg62-turbo-dev
\
libldap2-dev
\
libmcrypt-dev
\
libmemcached-dev
\
libssl-dev
\
libxml2-dev
\
make
\
netcat-openbsd
\
ssl-cert
\
subversion
\
unzip
\
vim
\
wget
\
zlib1g-dev
RUN
docker-php-ext-configure ldap
--with-libdir
=
lib/x86_64-linux-gnu
&&
\
docker-php-ext-configure opcache
--enable-opcache
&&
\
docker-php-ext-install
-j
$(
nproc
)
\
curl
\
gd
\
gettext
\
iconv
\
intl
\
ldap
\
mbstring
\
opcache
\
soap
\
zip
RUN
rm
-rf
/var/lib/apt/lists/
*
# Installation d'extensions PECL
RUN
pear config-set http_proxy
"
$HTTP_PROXY
"
&&
\
pecl
install
xdebug
&&
docker-php-ext-enable xdebug
&&
\
pecl
install
memcached
&&
docker-php-ext-enable memcached
# Package PHP Oracle OCI8
ADD
docker/instantclient-basiclite-linux.x64-12.2.0.1.0.zip /tmp/
ADD
docker/instantclient-sdk-linux.x64-12.2.0.1.0.zip /tmp/
ADD
docker/instantclient-sqlplus-linux.x64-12.2.0.1.0.zip /tmp/
RUN
unzip /tmp/instantclient-basiclite-linux.x64-12.2.0.1.0.zip
-d
/usr/local/
&&
\
unzip /tmp/instantclient-sdk-linux.x64-12.2.0.1.0.zip
-d
/usr/local/
&&
\
unzip /tmp/instantclient-sqlplus-linux.x64-12.2.0.1.0.zip
-d
/usr/local/
&&
\
ln
-s
/usr/local/instantclient_12_2 /usr/local/instantclient
&&
\
ln
-s
/usr/local/instantclient/libclntsh.so.12.1 /usr/local/instantclient/libclntsh.so
&&
\
ln
-s
/usr/local/instantclient/sqlplus /usr/bin/sqlplus
&&
\
echo
'export LD_LIBRARY_PATH="/usr/local/instantclient"'
>>
/etc/apache2/envvars
&&
\
# echo 'export LD_LIBRARY_PATH="/usr/local/instantclient"' >> /root/.bashrc &&
\
# echo 'umask 002' >> /root/.bashrc &&
\
echo
'instantclient,/usr/local/instantclient'
| pecl
install
oci8
&&
\
echo
"extension=oci8.so"
>
/usr/local/etc/php/conf.d/php-oci8.ini
ENV
LD_LIBRARY_PATH /usr/local/instantclient
# Symlink apache access and error logs to stdout/stderr so Docker logs shows them
RUN
ln
-sf
/dev/stdout /var/log/apache2/access.log
RUN
ln
-sf
/dev/stdout /var/log/apache2/other_vhosts_access.log
RUN
ln
-sf
/dev/stderr /var/log/apache2/error.log
# Config PHP.
ADD
docker/php.conf /usr/local/etc/php/conf.d/webapp.ini
#ADD docker/php-opcache.ini /usr/local/etc/php/conf.d/01-opcache.ini
ADD
docker/php.conf ${PHP_CONF_DIR}/fpm/conf.d/sygal-import-ws.ini
# Configuration et activation des sites Apache
ADD
docker/apache-ports.conf /etc/apache2/ports.conf
ADD
docker/apache-site.conf /etc/apache2/sites-available/webapp.conf
ADD
docker/apache-site-ssl.conf /etc/apache2/sites-available/webapp-ssl.conf
RUN
a2enmod headers
alias
rewrite ssl
&&
\
a2ensite webapp
&&
\
a2ensite webapp-ssl
# Configuration Apache et FPM
ADD
docker/apache-ports.conf ${APACHE_CONF_DIR}/ports.conf
ADD
docker/apache-site.conf ${APACHE_CONF_DIR}/sites-available/sygal-import-ws.conf
ADD
docker/apache-site-ssl.conf ${APACHE_CONF_DIR}/sites-available/sygal-import-ws-ssl.conf
ADD
docker/fpm/pool.d/app.conf ${PHP_CONF_DIR}/fpm/pool.d/sygal-import-ws.conf
# Install Composer.
RUN
curl
-sS
https://getcomposer.org/installer | php
--
--install-dir
=
/usr/local/bin
--filename
=
composer
RUN
a2ensite sygal-import-ws sygal-import-ws-ssl
&&
\
service php7.0-fpm reload
docker-compose.yml
View file @
d8617313
...
...
@@ -6,9 +6,9 @@ services:
build
:
context
:
.
ports
:
-
"
8080:80
80
"
-
"
8443:
8
443"
-
"
8080:80"
-
"
8443:443"
volumes
:
-
.:/var/www/
html/
sygal-import-ws
working_dir
:
/var/www/
html/
sygal-import-ws
-
.:/var/www/sygal-import-ws
working_dir
:
/var/www/sygal-import-ws
network_mode
:
bridge
docker/apache-ports.conf
View file @
d8617313
Listen
80
80
Listen
8
443
Listen
80
Listen
443
docker/apache-site-ssl.conf
View file @
d8617313
<
VirtualHost
*:
8
443
>
<
VirtualHost
*:
443
>
ServerName
localhost
DocumentRoot
/
var
/
www
/
html
/
sygal
-
import
-
ws
/
public
DocumentRoot
/
var
/
www
/
sygal
-
import
-
ws
/
public
RewriteEngine
On
<
Directory
/
var
/
www
/
html
/
sygal
-
import
-
ws
/
public
>
<
Directory
/
var
/
www
/
sygal
-
import
-
ws
/
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-sygal-import-ws.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
...
...
docker/apache-site.conf
View file @
d8617313
<
VirtualHost
*:
80
80
>
<
VirtualHost
*:
80
>
ServerName
localhost
DocumentRoot
/
var
/
www
/
html
/
sygal
-
import
-
ws
/
public
DocumentRoot
/
var
/
www
/
sygal
-
import
-
ws
/
public
RewriteEngine
On
### Redirection en HTTPS
RewriteCond
%{
SERVER_PORT
} !^
8443
$
RewriteRule
^/(.*)
https
://%{
SERVER_NAME
}:
8443
/$
1
[
L
,
R
]
Header
always
set
Strict
-
Transport
-
Security
"max-age=15768000; includeSubdomains;"
<
Directory
/
var
/
www
/
html
/
sygal
-
import
-
ws
/
public
>
DirectoryIndex
index
.
php
AllowOverride
All
Require
all
granted
</
Directory
>
### Redirection en HTTPS
RewriteCond
%{
SERVER_PORT
} !^
443
$
RewriteRule
^/(.*)
https
://%{
SERVER_NAME
}:
443
/$
1
[
L
,
R
]
ErrorLog
${
APACHE_LOG_DIR
}/
error
.
log
CustomLog
${
APACHE_LOG_DIR
}/
access
.
log
combined
#LogLevel debug
</
VirtualHost
>
\ No newline at end of file
docker/fpm/pool.d/app.conf
0 → 100644
View file @
d8617313
[
sygal
-
import
-
ws
]
user
=
www
-
data
group
=
www
-
data
listen
= /
var
/
run
/
php7
.
0
-
fpm
-
sygal
-
import
-
ws
.
sock
listen
.
owner
=
www
-
data
listen
.
group
=
www
-
data
;
mandatory
values
;
Soit
:
;
pm
=
dynamic
;
pm
.
max_children
=
5
;
pm
.
start_servers
=
2
;
pm
.
min_spare_servers
=
1
;
pm
.
max_spare_servers
=
3
;
Soit
:
pm
=
ondemand
pm
.
max_children
=
35
pm
.
process_idle_timeout
=
10
s
pm
.
max_requests
=
500
request_slowlog_timeout
=
30
slowlog
= /
var
/
log
/
php5
-
fpm
.
slow
.
log
docker/instantclient-basiclite-linux.x64-12.2.0.1.0.zip
deleted
100644 → 0
View file @
3db208b1
File deleted
docker/instantclient-sdk-linux.x64-12.2.0.1.0.zip
deleted
100644 → 0
View file @
3db208b1
File deleted
docker/instantclient-sqlplus-linux.x64-12.2.0.1.0.zip
deleted
100644 → 0
View file @
3db208b1
File deleted
docker/php-opcache.ini
deleted
100644 → 0
View file @
3db208b1
opcache.memory_consumption
=
128
opcache.interned_strings_buffer
=
8
opcache.max_accelerated_files
=
4000
opcache.revalidate_freq
=
60
opcache.fast_shutdown
=
1
opcache.enable_cli
=
1
opcache.enable
=
1
docker/php.conf
View file @
d8617313
date
.
timezone
=
Europe
/
Paris
short_open_tag
=
Off
expose_php
=
Off
#display_startup_errors = On
#error_reporting = E_ALL & ~E_DEPRECATED & ~E_NOTICE
#display_startup_errors = 1
display_errors
=
0
#
display_errors
=
Off
opcache
.
enable
=
0
#upload_max_filesize = 51M
#post_max_size = 60M
#
#xdebug.remote_enable = 1
#xdebug.remote_connect_back = 1
#xdebug.profiler_enable_trigger = 1
#xdebug.max_nesting_level = 250
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment