From ed59991aa81e3dd9c3d3c667aadbce0400f35dba Mon Sep 17 00:00:00 2001 From: Shadchamp <172061051+Shadchamp@users.noreply.github.com> Date: Thu, 28 Aug 2025 23:19:00 -0400 Subject: [PATCH] Adding additional info --- README.md | 89 ---------------------------------------------- Troubleshooting.md | 8 +++++ tips.md | 89 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+), 89 deletions(-) create mode 100644 tips.md diff --git a/README.md b/README.md index 8eb20c9..c0ef517 100644 --- a/README.md +++ b/README.md @@ -216,92 +216,3 @@ Apply new configurations or restart the environment: --- -## Additional Notes - -- **Permissions:** Use `sudo` cautiously to avoid permission conflicts, especially with Docker commands requiring elevated access. - ---- - -## Appendix: Sail Commands for UNIT3D - -### Docker Management - -- **Start environment:** - ```bash - ./vendor/bin/sail up -d - ``` - Starts Docker containers in detached mode. - -- **Stop environment:** - ```bash - ./vendor/bin/sail down - ``` - Stops and removes Docker containers. - -- **Restart environment:** - ```bash - ./vendor/bin/sail restart - ``` - Applies changes by restarting the Docker environment. - -### Dependency Management - -- **Install Composer dependencies:** - ```bash - ./vendor/bin/sail composer install - ``` - Installs PHP dependencies. - -- **Update Composer dependencies:** - ```bash - ./vendor/bin/sail composer update - ``` - Updates PHP dependencies. - -### Laravel Artisan - -- **Run migrations:** - ```bash - ./vendor/bin/sail artisan migrate - ``` - Executes database migrations. - -- **Seed database:** - ```bash - ./vendor/bin/sail artisan db:seed - ``` - Seeds the database. - -- **Refresh database:** - ```bash - ./vendor/bin/sail artisan migrate:fresh --seed - ``` - Resets and seeds the database. - -- **Cache configurations:** - ```bash - ./vendor/bin/sail artisan set:all_cache - ``` - Clears and caches configurations. - -### NPM and Assets - -- **Install Node.js dependencies:** - ```bash - ./vendor/bin/sail bun install - ``` - Installs Node.js dependencies. - -- **Compile assets:** - ```bash - ./vendor/bin/sail bun run build - ``` - Compiles CSS and JavaScript assets. - -### Database Operations - -- **MySQL interaction:** - ```bash - ./vendor/bin/sail mysql -u root -p - ``` - Opens MySQL CLI. diff --git a/Troubleshooting.md b/Troubleshooting.md index 8c0918f..649898c 100644 --- a/Troubleshooting.md +++ b/Troubleshooting.md @@ -1,4 +1,12 @@ +- **Rerun Composer after updating `.env`:** + After making changes to your `.env` file, run the following commands to update dependencies and regenerate autoload files: + ```bash + ./vendor/bin/sail composer update + ./vendor/bin/sail composer install + ``` + This ensures your application uses the latest configuration and dependencies. + - **Fix MySQL root user error:** If you encounter `ERROR 1396 (HY000) ... CREATE USER failed for 'root'@'%'`, run the following inside the MySQL CLI: To execute MySQL commands directly inside the running MySQL container, use: diff --git a/tips.md b/tips.md new file mode 100644 index 0000000..d142c4a --- /dev/null +++ b/tips.md @@ -0,0 +1,89 @@ +## Additional Notes + +- **Permissions:** Use `sudo` cautiously to avoid permission conflicts, especially with Docker commands requiring elevated access. + +--- + +## Appendix: Sail Commands for UNIT3D + +### Docker Management + +- **Start environment:** + ```bash + ./vendor/bin/sail up -d + ``` + Starts Docker containers in detached mode. + +- **Stop environment:** + ```bash + ./vendor/bin/sail down + ``` + Stops and removes Docker containers. + +- **Restart environment:** + ```bash + ./vendor/bin/sail restart + ``` + Applies changes by restarting the Docker environment. + +### Dependency Management + +- **Install Composer dependencies:** + ```bash + ./vendor/bin/sail composer install + ``` + Installs PHP dependencies. + +- **Update Composer dependencies:** + ```bash + ./vendor/bin/sail composer update + ``` + Updates PHP dependencies. + +### Laravel Artisan + +- **Run migrations:** + ```bash + ./vendor/bin/sail artisan migrate + ``` + Executes database migrations. + +- **Seed database:** + ```bash + ./vendor/bin/sail artisan db:seed + ``` + Seeds the database. + +- **Refresh database:** + ```bash + ./vendor/bin/sail artisan migrate:fresh --seed + ``` + Resets and seeds the database. + +- **Cache configurations:** + ```bash + ./vendor/bin/sail artisan set:all_cache + ``` + Clears and caches configurations. + +### NPM and Assets + +- **Install Node.js dependencies:** + ```bash + ./vendor/bin/sail bun install + ``` + Installs Node.js dependencies. + +- **Compile assets:** + ```bash + ./vendor/bin/sail bun run build + ``` + Compiles CSS and JavaScript assets. + +### Database Operations + +- **MySQL interaction:** + ```bash + ./vendor/bin/sail mysql -u root -p + ``` + Opens MySQL CLI.