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
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
# Salin source code aplikasi (Pastikan folder 'vendor' ikut tersalin ke sini)
|
# Salin source code aplikasi
|
||||||
COPY . /var/www/html
|
COPY . /var/www/html
|
||||||
|
|
||||||
# =========================================================
|
# Buat file .env dari .env.example jika .env belum ada di repositori
|
||||||
# PERHATIAN: Blok 'RUN composer install' DIHAPUS.
|
RUN if [ ! -f .env ]; then cp .env.example .env; fi
|
||||||
# Pastikan folder vendor/ sudah di-commit ke Git!
|
|
||||||
# =========================================================
|
|
||||||
|
|
||||||
# Atur hak akses folder web, storage, dan cache Laravel
|
# Atur hak akses folder web, storage, dan cache Laravel
|
||||||
RUN chown -R www-data:www-data /var/www/html \
|
RUN chown -R www-data:www-data /var/www/html \
|
||||||
|
|||||||
Reference in New Issue
Block a user