This repository contains a Docker Compose setup for a Laravel project. It includes services for the Laravel application, Nginx web server, MySQL database, and Adminer for database management.
Make sure you have Docker and Docker Compose installed on your machine.
-
Clone this repository:
git clone https://github.com/winkersco/simple-blog
-
Create a
.env
file inlaravel
folder:cd simple-blog/laravel cp .env.example .env
-
Get back to project folder and Start docker containers:
cd .. docker compose up -d
-
Install laravel dependencies:
docker compose exec app composer install
-
Generate laravel application Key:
docker compose exec app php artisan key:generate
-
You can also run tests for your application (optional):
docker compose exec app php artisan test
-
Run migrations and seeders:
docker compose exec app php artisan migrate --seed
-
Now, open your browser and navigate to http://localhost:8080.
You can use the following default credentials for logging into the application:
-
User:
- Email:
user@gmail.com
- Password:
password
- Email:
-
Admin:
- Email:
admin@gmail.com
- Password:
password
- Email:
You can use Adminer
to manage your database. To access Adminer, follow these steps:
- Open your browser and navigate to http://localhost:8081.
- Use the following default database credentials or change them in configurations:
- System:
MySQL
- Server:
db
- Username:
default
- Password:
secret
- Database:
default
- System: