Skip to content

b4its/smart-mbg

Repository files navigation

Laravel Logo

Build Status Total Downloads Latest Stable Version License

About Laravel

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects.

diharapkan untuk membuat folder media didalam folder public terlebih dahulu

clear configurations and optimize css

php artisan config:clear
php artisan view:clear
php artisan cache:clear
php artisan route:clear
php artisan optimize:clear
php artisan optimize

extra clear configuration and optimize css in docker profile nginx

docker exec -it mbg-php-fpm bash -c "php artisan config:clear && php artisan view:clear && php artisan cache:clear && php artisan route:clear && php artisan optimize:clear && php artisan optimize"

Docker Setup

untuk menjalankan nginx dan db

docker compose --profile nginx up -d

untuk menjalankan apache dan db

docker compose --profile apache up -d

untuk menjalankan mysql

docker exec -it mbg-db mysql -u root

untuk masuk ke terimal container apache

docker exec -it mbg-php-fpm bash

untuk solo command

# Jika pakai Nginx
docker exec -it mbg-php-fpm php artisan serve
docker compose exec php-fpm composer install
# untuk melihat log seperti php artisan serve
docker compose logs -f nginx php-fpm
# Jika pakai Apache
docker exec -it mbg-apache php artisan serve

untuk mematikan container

# untuk selesai code
docker compose down

# untuk rest bentar
docker compose stop

# untuk reset total dan ganti konfigurasi
docker compose down -v
docker compose --profile nginx down -v

untuk new project laravel

docker compose exec apache composer create-project laravel/laravel:^13.0 .
# atau
docker compose exec apache composer create-project laravel/laravel .

docker permission

# Masuk ke container PHP dan ubah owner folder ke user web (www-data)
sudo chown -R $USER:$USER .
docker exec -it mbg-php-fpm chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache
docker exec -it mbg-php-fpm chmod -R 775 /var/www/html/storage /var/www/html/bootstrap/cache

# bash docker
php artisan storage:link
chown -R www-data:www-data /var/www/html/public/
chmod -R 775 /var/www/html/public/

# stop docker profile container 
docker compose --profile nginx stop

# cek status container
docker compose --profile nginx ps

# restart container
docker compose --profile nginx restart

# lihat log
docker compose logs -f ml-think
docker compose logs -f php-fpm
docker compose logs -f fabric-gateway

# melihat semua log container
php-fpm bash
# Berikan izin baca-tulis penuh

License

The Laravel framework is open-sourced software licensed under the MIT license.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors