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

Dockerfile.sh : suppression de la config serveur car ça dépend du serveur

parent affb4905
Loading
Loading
Loading
Loading
Loading
+4 −23
Original line number Diff line number Diff line
#!/usr/bin/env bash

#
# Script d'install d'un serveur, traduction du Dockerfile.
# Script d'install d'un serveur, traduction partielle du Dockerfile.
#

usage() {
@@ -17,13 +17,12 @@ EOF
################################################################################################################

PHP_VERSION="$1"
APP_DIR=$(cd `dirname $0` && pwd)

set -e

# Minimum vital
apt-get -qq update && \
apt-get install -y \
sudo -E apt-get -qq update && \
sudo -E apt-get install -y \
    git \
    nano

@@ -33,23 +32,5 @@ git clone https://git.unicaen.fr/open-source/docker/unicaen-image.git ${UNICAEN_
cd ${UNICAEN_IMAGE_TMP_DIR}
. Dockerfile.sh ${PHP_VERSION}


cd ${APP_DIR}

# NB: Variables d'env positionnées par ${UNICAEN_IMAGE_TMP_DIR}/Dockerfile.sh
# APACHE_CONF_DIR=/etc/apache2 \
# PHP_CONF_DIR=/etc/php/$1

# Configuration Apache et FPM
cp docker/apache-ports.conf    ${APACHE_CONF_DIR}/ports.conf
cp docker/apache-site.conf     ${APACHE_CONF_DIR}/sites-available/app.conf
cp docker/apache-site-ssl.conf ${APACHE_CONF_DIR}/sites-available/app-ssl.conf
cp docker/fpm/pool.d/app.conf  ${PHP_CONF_DIR}/fpm/pool.d/app.conf
cp docker/fpm/conf.d/app.ini   ${PHP_CONF_DIR}/fpm/conf.d/90-app.ini

sed -i -re 's/SetEnv APPLICATION_ENV "(development|test)"/SetEnv APPLICATION_ENV "production"/' \
    ${APACHE_CONF_DIR}/sites-available/app-ssl.conf

a2ensite app app-ssl && \
    service apache2 reload && \
    service php${PHP_VERSION}-fpm reload
# (c'est selon le serveur)