Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lib
unicaen
skeleton-application
Commits
3e49a646
Commit
3e49a646
authored
Mar 06, 2019
by
Bertrand Gauthier
Browse files
Améliorations concernant Docker.
parent
6726fc2a
Changes
9
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
3e49a646
...
...
@@ -24,14 +24,12 @@ 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 ${PHP_CONF_DIR}/fpm/conf.d/webapp.ini
# Configuration Apache et FPM
ADD
docker/apache-ports.conf ${APACHE_CONF_DIR}/ports.conf
ADD
docker/apache-site.conf ${APACHE_CONF_DIR}/sites-available/webapp.conf
ADD
docker/apache-site-ssl.conf ${APACHE_CONF_DIR}/sites-available/webapp-ssl.conf
ADD
docker/fpm/pool.d/app.conf ${PHP_CONF_DIR}/fpm/pool.d/webapp.conf
ADD
docker/fpm/conf.d/app.ini ${PHP_CONF_DIR}/fpm/conf.d/app.ini
RUN
a2ensite webapp webapp-ssl
&&
\
service php7.0-fpm reload
Dockerfile-7.0
0 → 100644
View file @
3e49a646
###########################################################################################
#
# Image pour le dev.
#
###########################################################################################
FROM unicaen-dev-php7.0-apache
LABEL maintainer="Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>"
WORKDIR /app
ADD . /app
ENV APACHE_CONF_DIR=/etc/apache2 \
PHP_CONF_DIR=/etc/php/7.0
## Installation de packages requis.
RUN apt-get install -y \
sqlite3 \
php7.0-pdo-sqlite
RUN pecl install ast && \
echo "extension=ast.so" > ${PHP_CONF_DIR}/cli/conf.d/ast.ini
# Nettoyage
RUN apt-get autoremove -y && apt-get clean && rm -rf /tmp/* /var/tmp/*
# 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
# Configuration Apache et FPM
ADD docker/apache-ports.conf ${APACHE_CONF_DIR}/ports.conf
ADD docker/apache-site.conf ${APACHE_CONF_DIR}/sites-available/webapp.conf
ADD docker/apache-site-ssl.conf ${APACHE_CONF_DIR}/sites-available/webapp-ssl.conf
ADD docker/fpm/pool.d/app.conf ${PHP_CONF_DIR}/fpm/pool.d/webapp.conf
ADD docker/fpm/conf.d/app.ini ${PHP_CONF_DIR}/fpm/conf.d/app.ini
RUN a2ensite webapp webapp-ssl && \
service php7.0-fpm reload
Dockerfile-7.1
0 → 100644
View file @
3e49a646
###########################################################################################
#
# Image pour le dev.
#
###########################################################################################
FROM unicaen-dev-php7.1-apache
LABEL maintainer="Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>"
WORKDIR /app
ADD . /app
ENV APACHE_CONF_DIR=/etc/apache2 \
PHP_CONF_DIR=/etc/php/7.1
## Installation de packages requis.
RUN apt-get install -y \
sqlite3 \
php7.1-pdo-sqlite
RUN pecl install ast && \
echo "extension=ast.so" > ${PHP_CONF_DIR}/cli/conf.d/ast.ini
# Nettoyage
RUN apt-get autoremove -y && apt-get clean && rm -rf /tmp/* /var/tmp/*
# 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
# Configuration Apache et FPM
ADD docker/apache-ports.conf ${APACHE_CONF_DIR}/ports.conf
ADD docker/apache-site.conf ${APACHE_CONF_DIR}/sites-available/webapp.conf
ADD docker/apache-site-ssl.conf ${APACHE_CONF_DIR}/sites-available/webapp-ssl.conf
ADD docker/fpm/pool.d/app.conf ${PHP_CONF_DIR}/fpm/pool.d/webapp.conf
ADD docker/fpm/conf.d/app.ini ${PHP_CONF_DIR}/fpm/conf.d/app.ini
RUN a2ensite webapp webapp-ssl && \
service php7.1-fpm reload
Dockerfile-7.2
0 → 100644
View file @
3e49a646
###########################################################################################
#
# Image pour le dev.
#
###########################################################################################
FROM unicaen-dev-php7.2-apache
LABEL maintainer="Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>"
WORKDIR /app
ADD . /app
ENV APACHE_CONF_DIR=/etc/apache2 \
PHP_CONF_DIR=/etc/php/7.2
## Installation de packages requis.
RUN apt-get install -y \
sqlite3 \
php7.2-pdo-sqlite
RUN pecl install ast && \
echo "extension=ast.so" > ${PHP_CONF_DIR}/cli/conf.d/ast.ini
# Nettoyage
RUN apt-get autoremove -y && apt-get clean && rm -rf /tmp/* /var/tmp/*
# 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
# Configuration Apache et FPM
ADD docker/apache-ports.conf ${APACHE_CONF_DIR}/ports.conf
ADD docker/apache-site.conf ${APACHE_CONF_DIR}/sites-available/webapp.conf
ADD docker/apache-site-ssl.conf ${APACHE_CONF_DIR}/sites-available/webapp-ssl.conf
ADD docker/fpm/pool.d/app.conf ${PHP_CONF_DIR}/fpm/pool.d/webapp.conf
ADD docker/fpm/conf.d/app.ini ${PHP_CONF_DIR}/fpm/conf.d/app.ini
RUN a2ensite webapp webapp-ssl && \
service php7.2-fpm reload
Dockerfile-7.3
0 → 100644
View file @
3e49a646
###########################################################################################
#
# Image pour le dev.
#
###########################################################################################
FROM unicaen-dev-php7.3-apache
LABEL maintainer="Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>"
WORKDIR /app
ADD . /app
ENV APACHE_CONF_DIR=/etc/apache2 \
PHP_CONF_DIR=/etc/php/7.3
## Installation de packages requis.
RUN apt-get install -y \
sqlite3 \
php7.3-pdo-sqlite
RUN pecl install ast && \
echo "extension=ast.so" > ${PHP_CONF_DIR}/cli/conf.d/ast.ini
# Nettoyage
RUN apt-get autoremove -y && apt-get clean && rm -rf /tmp/* /var/tmp/*
# 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
# Configuration Apache et FPM
ADD docker/apache-ports.conf ${APACHE_CONF_DIR}/ports.conf
ADD docker/apache-site.conf ${APACHE_CONF_DIR}/sites-available/webapp.conf
ADD docker/apache-site-ssl.conf ${APACHE_CONF_DIR}/sites-available/webapp-ssl.conf
ADD docker/fpm/pool.d/app.conf ${PHP_CONF_DIR}/fpm/pool.d/webapp.conf
ADD docker/fpm/conf.d/app.ini ${PHP_CONF_DIR}/fpm/conf.d/app.ini
RUN a2ensite webapp webapp-ssl && \
service php7.3-fpm reload
docker-compose.yml
View file @
3e49a646
...
...
@@ -4,6 +4,7 @@ services:
skeleton-application
:
container_name
:
skeleton-application-container
build
:
dockerfile
:
Dockerfile-7.2
context
:
.
ports
:
-
"
8880:80"
...
...
docker/apache-site-ssl.conf
View file @
3e49a646
<
VirtualHost
*:
443
>
ServerName
localhost
DocumentRoot
/
var
/
www
/
web
app
/
public
DocumentRoot
/
app
/
public
SetEnv
APPLICATION_ENV
"development"
RewriteEngine
On
<
Directory
/
var
/
www
/
web
app
/
public
>
<
Directory
/
app
/
public
>
DirectoryIndex
index
.
php
AllowOverride
All
Require
all
granted
...
...
docker/apache-site.conf
View file @
3e49a646
<
VirtualHost
*:
80
>
ServerName
localhost
DocumentRoot
/
var
/
www
/
web
app
/
public
DocumentRoot
/
app
/
public
RewriteEngine
On
...
...
docker/
php.conf
→
docker/
fpm/conf.d/app.ini
View file @
3e49a646
File moved
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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