A Dockerized Laravel development environment
- Clone the Repository:
git clone <https://github.com/15g-lucas/laravel-docker-starter.git>
- Install Dependencies:
composer install npm install
- Configure Environment:
- Copy the
.env.example
file to.env
and customize it with your desired database credentials.
cp .env.example .env
- Copy the
- Start Development Environment:
docker-compose up -d --build
- Customize database credentials: Modify the
.env
file with your preferred database settings:DB_DATABASE=your_database DB_USERNAME=your_username DB_PASSWORD=your_password
- Other environment variables: You can define additional environment variables as needed for your application, such as API keys, application URLs, etc.
- Services: Customize the services (e.g., add a mailhog service for testing emails).
- Networks: Define additional networks for communication between services.
- Volumes: Mount additional volumes to persist data.
docker exec -it laravel_app bash