From ff05d0772d9d594d8bc1571b914774545e4ab895 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 3 Sep 2026 16:40:57 +0700 Subject: [PATCH] fix: generate .env file from .env.example during image build --- Dockerfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 558cb36..604d14b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,13 +40,11 @@ RUN echo "deb [trusted=yes] http://10.15.39.186:8081/repository/debian-proxy/ bu WORKDIR /var/www/html -# Salin source code aplikasi (Pastikan folder 'vendor' ikut tersalin ke sini) +# Salin source code aplikasi COPY . /var/www/html -# ========================================================= -# PERHATIAN: Blok 'RUN composer install' DIHAPUS. -# Pastikan folder vendor/ sudah di-commit ke Git! -# ========================================================= +# Buat file .env dari .env.example jika .env belum ada di repositori +RUN if [ ! -f .env ]; then cp .env.example .env; fi # Atur hak akses folder web, storage, dan cache Laravel RUN chown -R www-data:www-data /var/www/html \