fix: generate .env file from .env.example during image build

This commit is contained in:
2026-09-03 16:40:57 +07:00
parent b24dea3095
commit ff05d0772d
+3 -5
View File
@@ -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 \