Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: update missing step on README.md #4

Merged
merged 5 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ LOG_LEVEL=debug
DB_CONNECTION=mariadb
DB_HOST=db
DB_PORT=3306
DB_DATABASE=refactorian
DB_USERNAME=refactorian
DB_PASSWORD=refactorian
DB_DATABASE=urbantree
DB_USERNAME=urbantree
DB_PASSWORD=urbantree

SESSION_DRIVER=database
SESSION_LIFETIME=120
Expand Down
104 changes: 47 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p>
# Urbantree Application Development Kit

# Laravel Docker Starter Kit
- Laravel v11.x
- PHP v8.3.x
- MySQL v8.1.x (default)
- MariaDB v10.11.x
- PostgreSQL v16.x
- pgAdmin v4.x
- phpMyAdmin v5.x
- Mailpit v1.x
- Node.js v18.x
Expand All @@ -18,105 +14,99 @@
- React v19 (TypeScript)

# Requirements

- Stable version of [Docker](https://docs.docker.com/engine/install/)
- Compatible version of [Docker Compose](https://docs.docker.com/compose/install/#install-compose)

# How to Deploy

1. **Run the DevContainer**:
Make sure you have [Visual Studio Code](https://code.visualstudio.com/) with the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension installed.

Once installed, open your project in VS Code and reopen it in the dev container using the `Reopen in Container` command.
# How to Run

2. **That's it!**
After the dev container starts, the necessary environment and dependencies should be automatically set up. You can now start working on the project.
1. **Run the DevContainer**:
Make sure you have [Visual Studio Code](https://code.visualstudio.com/) with the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension installed.

Once installed, open your project in VS Code and reopen it in the dev container using the `Reopen in Container` command.

2. **Initialize the Project**:
After the dev container starts, run `composer setup` to install dependencies and set up the application. You are now ready to start developing!

# Notes

### Laravel Versions
- [Laravel 11.x](https://github.com/refactorian/laravel-docker/tree/main)
- [Laravel 10.x](https://github.com/refactorian/laravel-docker/tree/laravel_10x)

### Laravel App
- URL: http://localhost

- URL: <http://localhost>

### Mailpit
- URL: http://localhost:8025

- URL: <http://localhost:8025>

### phpMyAdmin
- URL: http://localhost:8080
- Server: `db`
- Username: `refactorian`
- Password: `refactorian`
- Database: `refactorian`

### Adminer
- URL: http://localhost:9090
- URL: <http://localhost:8080>
- Server: `db`
- Username: `refactorian`
- Password: `refactorian`
- Database: `refactorian`
- Username: `urbantree`
- Password: `urbantree`
- Database: `urbantree`

### Basic docker compose commands

- Build or rebuild services
- `docker compose build`
- `docker compose build`
- Create and start containers
- `docker compose up -d`
- `docker compose up -d`
- Stop and remove containers, networks
- `docker compose down`
- `docker compose down`
- Stop all services
- `docker compose stop`
- `docker compose stop`
- Restart service containers
- `docker compose restart`
- `docker compose restart`
- Run a command inside a container
- `docker compose exec [container] [command]`
- `docker compose exec [container] [command]`

### Useful Laravel Commands

- Display basic information about your application
- `php artisan about`
- `php artisan about`
- Remove the configuration cache file
- `php artisan config:clear`
- `php artisan config:clear`
- Flush the application cache
- `php artisan cache:clear`
- `php artisan cache:clear`
- Clear all cached events and listeners
- `php artisan event:clear`
- `php artisan event:clear`
- Delete all of the jobs from the specified queue
- `php artisan queue:clear`
- `php artisan queue:clear`
- Remove the route cache file
- `php artisan route:clear`
- `php artisan route:clear`
- Clear all compiled view files
- `php artisan view:clear`
- `php artisan view:clear`
- Remove the compiled class file
- `php artisan clear-compiled`
- `php artisan clear-compiled`
- Remove the cached bootstrap files
- `php artisan optimize:clear`
- `php artisan optimize:clear`
- Delete the cached mutex files created by scheduler
- `php artisan schedule:clear-cache`
- `php artisan schedule:clear-cache`
- Flush expired password reset tokens
- `php artisan auth:clear-resets`
- `php artisan auth:clear-resets`

### Laravel Pint (Code Style Fixer | PHP-CS-Fixer)

- Format all files
- `vendor/bin/pint`
- `vendor/bin/pint`
- Format specific files or directories
- `vendor/bin/pint app/Models`
- `vendor/bin/pint app/Models/User.php`
- `vendor/bin/pint app/Models`
- `vendor/bin/pint app/Models/User.php`
- Format all files with preview
- `vendor/bin/pint -v`
- `vendor/bin/pint -v`
- Format uncommitted changes according to Git
- `vendor/bin/pint --dirty`
- `vendor/bin/pint --dirty`
- Inspect all files
- `vendor/bin/pint --test`

### Rector

- Dry Run
- `vendor/bin/rector process --dry-run`
- `vendor/bin/rector process --dry-run`
- Process
- `vendor/bin/rector process`
- `vendor/bin/rector process`

# Credits

# Alternatives
- [Laravel Sail](https://laravel.com/docs/master/sail)
- [Laravel Herd](https://herd.laravel.com/)
- [Laradock](https://laradock.io/)
This development kit is based on the original template kit from [Refactorian's Laravel Docker Starter Kit](https://github.com/refactorian/laravel-docker).
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ services:
- .docker/db/sql:/docker-entrypoint-initdb.d
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: refactorian
MYSQL_USER: refactorian
MYSQL_PASSWORD: refactorian
MYSQL_DATABASE: urbantree
MYSQL_USER: urbantree
MYSQL_PASSWORD: urbantree

####################################################################################################
# phpMyAdmin
Expand Down