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

Améliorations.

parent 1e1b368a
......@@ -3,38 +3,17 @@ FROM unicaen-dev-php${PHP_VERSION}-apache
LABEL maintainer="Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>"
WORKDIR /app
ADD .. /app
ARG PHP_VERSION
RUN echo "PHP_VERSION=${PHP_VERSION}"
ADD . /app
ENV APACHE_CONF_DIR=/etc/apache2
ENV PHP_CONF_DIR=/etc/php/${PHP_VERSION}
### Installation de packages requis.
#RUN apt-get install -y \
# sqlite3 \
# php${PHP_VERSION}-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 php${PHP_VERSION}-fpm reload
WORKDIR /app
#!/usr/bin/env bash
docker-compose -f vendor/unicaen/php-compat/docker-compose.yml build
#!/usr/bin/env bash
[[ -z $1 ]] && echo "Veuillez spécifier la version de PHP désirée (ex: 7.2)." && exit 1
DIR=$(cd `dirname $0` && pwd)
v=$1
unicaenlogfile=/tmp/phan-unicaen-${v}.log
vendorslogfile=/tmp/phan-vendors-${v}.log
DIR=$(cd `dirname $0` && pwd)
docker-compose -f ${DIR}/../docker-compose.yml build
docker exec \
unicaen-php-compat-${v}-container \
vendor/bin/phan \
--config-file .phan/config-unicaen.php \
--target-php-version ${v} \
> ${unicaenlogfile}
docker exec \
unicaen-php-compat-${v}-container \
vendor/bin/phan \
--config-file .phan/config-vendor.php \
--target-php-version ${v} \
> ${unicaenlogfile}
echo
echo "See ${unicaenlogfile}."
echo "See ${vendorslogfile}."
echo
......@@ -16,6 +16,10 @@
"phpcompatibility/php-compatibility": "*",
"phan/phan": "^1.2"
},
"bin": [
"bin/php-compat-build.sh",
"bin/php-compat-run.sh"
],
"scripts": {
},
"autoload": {
......
......@@ -4,64 +4,47 @@ services:
unicaen-php-compat-7.0:
image: unicaen-php-compat-7.0
build:
dockerfile: Dockerfile
dockerfile: vendor/unicaen/php-compat/Dockerfile
args:
PHP_VERSION: 7.0
context: .
context: ../../.. # remonte jusqu'à l'appli
container_name: unicaen-php-compat-7.0-container
ports:
- "8070:80"
- "8470:443"
volumes:
- ${PWD}/composer.json:/app/composer.json
- ${PWD}/.phan:/app/.phan
- ${PWD}/vendor/unicaen/php-compat/.phan:/app/.phan
working_dir: /app
unicaen-php-compat-7.1:
image: unicaen-php-compat-7.1
build:
dockerfile: Dockerfile
dockerfile: vendor/unicaen/php-compat/Dockerfile
args:
PHP_VERSION: 7.1
context: .
context: ../../.. # remonte jusqu'à l'appli
container_name: unicaen-php-compat-7.1-container
ports:
- "8071:80"
- "8471:443"
volumes:
- ${PWD}/composer.json:/app/composer.json
- ${PWD}/.phan:/app/.phan
- ${PWD}/vendor/unicaen/php-compat/.phan:/app/.phan
working_dir: /app
unicaen-php-compat-7.2:
image: unicaen-php-compat-7.2
build:
dockerfile: Dockerfile
dockerfile: vendor/unicaen/php-compat/Dockerfile
args:
PHP_VERSION: 7.2
context: .
context: ../../.. # remonte jusqu'à l'appli
container_name: unicaen-php-compat-7.2-container
ports:
- "8072:80"
- "8472:443"
volumes:
- ${PWD}/../unicaen-skeleton-application:/app/unicaen-skeleton-application
- ${PWD}/composer.json:/app/composer.json
- ${PWD}/.phan:/app/.phan
- ${PWD}/vendor/unicaen/php-compat/.phan:/app/.phan
working_dir: /app
unicaen-php-compat-7.3:
image: unicaen-php-compat-7.3
build:
dockerfile: Dockerfile
dockerfile: vendor/unicaen/php-compat/Dockerfile
args:
PHP_VERSION: 7.3
context: .
context: ../../.. # remonte jusqu'à l'appli
container_name: unicaen-php-compat-7.3-container
ports:
- "8073:80"
- "8473:443"
volumes:
- ${PWD}/composer.json:/app/composer.json
- ${PWD}/.phan:/app/.phan
- ${PWD}/vendor/unicaen/php-compat/.phan:/app/.phan
working_dir: /app
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment