-
Clone the repository:
git clone <repository-url> cd webtech-laravel
-
Copy the example environment file and set your environment variables:
cp .env.example .env
Edit
.envas needed (e.g., set database credentials, app key, etc). -
Build image:
docker compose up -d --build
-
Run database migrations
docker exec webtech-laravel-laravel.test-1 php artisan migrate
Warning
In Case of 2025_07_06_134850_create_sessions_table not being migrated (check with docker compose exec webtech-laravel php artisan migrate:status), do the following:
-
Enter tinker mode:
docker compose exec webtech-laravel php artisan tinker -
Execute the following code snippet:
<?php DB::table('migrations')->insert([ 'migration' => '2025_07_06_134850_create_sessions_table', 'batch' => 1 ]); exit
-
Rerun migrations:
docker exec webtech-laravel-laravel.test-1 php artisan migrate
- Visit http://localhost in your browser.
- If you changed the port in
docker-compose.yml, use that port instead.