fix: generate .env file from .env.example during image build
This commit is contained in:
+3
-5
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user