Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kertnik05/laraveer

A simple docker setup template for laravel.
https://github.com/kertnik05/laraveer

docker docker-compose laravel mysql nginx php php74

Last synced: about 1 month ago
JSON representation

A simple docker setup template for laravel.

Awesome Lists containing this project

README

        

# Laraveer

> Prerequisites: `Docker` installed on your machine

### Docker Development Set-Up

1. Build images, volume and network by running the following:
```
docker-compose up -d --build
```

2. Install laravel by running the following:

```
docker-compose exec app composer create-project laravel/laravel .
```

3. Set your database credentials.

**Database**:
```
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=app
DB_USERNAME=app
DB_PASSWORD=secret
```

4. Voila! All should be working right now.
> [http://localhost](http://localhost)

----

Footnotes:

* Note that this takes a longer time to be accessible, specially when the container is freshly built. You can check the container logs to see its progress.

### Docker-compose cheat sheet
1. Laravel artisan commands `docker-compose exec app php artisan {command}`
2. Laravel migrate command `docker-compose exec app php artisan migrate`
3. Stopping services `docker-compose stop`
4. Starting services `docker-compose start`
5. Bash `docker-compose exec app bash`