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

https://github.com/tamtocode/laravel-react-note

Build a Laravel with React.
https://github.com/tamtocode/laravel-react-note

Last synced: 3 months ago
JSON representation

Build a Laravel with React.

Awesome Lists containing this project

README

        

# docker-laravel 🐳


docker-laravel



Test laravel-create-project.yml
Test laravel-git-clone.yml
License

## Introduction

Build a simple laravel development environment with docker-compose. Compatible with Windows(WSL2), macOS(M1) and Linux.

## Usage

### Laravel install

1. Click [Use this template](https://github.com/ucan-lab/docker-laravel/generate)
2. Git clone & change directory
3. Execute the following command

```bash
$ mkdir -p src
$ docker compose build
$ docker compose up -d
$ docker compose exec app composer create-project --prefer-dist laravel/laravel .
$ docker compose exec app php artisan key:generate
$ docker compose exec app php artisan storage:link
$ docker compose exec app chmod -R 777 storage bootstrap/cache
$ docker compose exec app php artisan migrate
```

http://localhost

### Laravel setup
https://blog.desdelinux.net/vi/Makefile-l%C3%A0-g%C3%AC-v%C3%A0-n%C3%B3-ho%E1%BA%A1t-%C4%91%E1%BB%99ng-nh%C6%B0-th%E1%BA%BF-n%C3%A0o-trong-linux/
1. Git clone & change directory
2. Execute the following command

```bash
$ sudo apt install make
$ make install
```

http://localhost

## Tips

- Read this [Makefile](https://github.com/ucan-lab/docker-laravel/blob/main/Makefile).
- Read this [Wiki](https://github.com/ucan-lab/docker-laravel/wiki).

## Container structures

```bash
├── app
├── web
└── db
```

### app container

- Base image
- [php](https://hub.docker.com/_/php):8.1-fpm-bullseye
- [composer](https://hub.docker.com/_/composer):2.2

### web container

- Base image
- [nginx](https://hub.docker.com/_/nginx):1.22

### db container

- Base image
- [mysql/mysql-server](https://hub.docker.com/r/mysql/mysql-server):8.0

### mailhog container

- Base image
- [mailhog/mailhog](https://hub.docker.com/r/mailhog/mailhog)