From 286d14493f4dde42c28837f9f01328c961ddd69c Mon Sep 17 00:00:00 2001 From: Bertrand GAUTHIER <bertrand.gauthier@unicaen.fr> Date: Tue, 7 Jun 2022 11:34:28 +0200 Subject: [PATCH] =?UTF-8?q?Correction=20de=20la=20doc=20:=20abandon=20de?= =?UTF-8?q?=20la=20strat=C3=A9gie=20'composer=20create-project'=20(pb=20si?= =?UTF-8?q?=20proxy)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e7b66f1..72bf1d4 100644 --- a/README.md +++ b/README.md @@ -16,22 +16,49 @@ environnement PHP dont on maîtrise la version. Pour obtenir puis construire cet ### Création des sources de l'application +- Pour obtenir le master des sources du squelette d'application : + ```bash APP_DIR=newapp + +git clone git@git.unicaen.fr:lib/unicaen/skeleton-application.git ${APP_DIR} +cd ${APP_DIR} +``` + +- Puis pour installer les dépendances PHP : + +```bash +# si vous avez la joie d'être derrière un proxy : +#HTTP_PROXY=http://10.14.128.99:3128 +#HTTPS_PROXY=${HTTP_PROXY} +#NO_PROXY=unicaen.fr,localhost + PHP_VERSION=7.3 docker run \ --rm \ -v $PWD:/app \ --w /app unicaen-dev-php${PHP_VERSION}-apache \ -composer create-project --repository https://gest.unicaen.fr/packagist unicaen/skeleton-application ${APP_DIR} - -cd ${APP_DIR} +-w /app \ +--env HTTP_PROXY \ +--env HTTPS_PROXY \ +--env NO_PROXY \ +unicaen-dev-php${PHP_VERSION}-apache \ +composer install ``` -Cette commande `composer create-project` fait un `git clone` pour obtenir le dernier tag des sources du squelette -d'application, puis un `composer install` pour installer les dépendances PHP. +- Puis pour installer les fichiers de config exemples : +```bash +docker run \ +--rm \ +-v $PWD:/app \ +-w /app \ +--env HTTP_PROXY \ +--env HTTPS_PROXY \ +--env NO_PROXY \ +unicaen-dev-php${PHP_VERSION}-apache \ +composer run-script "post-create-project-cmd" +``` ### Droits d'écriture @@ -39,7 +66,7 @@ Comme les commandes lancées via Docker (comme ici, `composer`) sont exécutées sur les fichiers créés. ```bash -sudo chown -R ${USER} . +sudo chown -R ${USER}:${USER} . ``` ### Création du dépôt git -- GitLab