From 7a299e00219e18439e556a42fcfdab0fb3961ddd Mon Sep 17 00:00:00 2001 From: Chingis Sandanov Date: Thu, 25 May 2023 16:09:18 +0300 Subject: [PATCH] Check that .env do not exists before generating one from template https://github.com/wodby/docker4laravel/issues/2 --- init/10_laravel_php.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/init/10_laravel_php.sh b/init/10_laravel_php.sh index d626cd4..b331bc8 100644 --- a/init/10_laravel_php.sh +++ b/init/10_laravel_php.sh @@ -6,4 +6,6 @@ if [[ -n "${DEBUG}" ]]; then set -x fi -gotpl "/etc/gotpl/.env.tmpl" > "${APP_ROOT}/.env" +if [[ ! -f "${APP_ROOT}/.env" ]]; then + gotpl "/etc/gotpl/.env.tmpl" > "${APP_ROOT}/.env" +fi