Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ega4432/lara-docker
:whale: Build the docker containers for Laravel local environment
https://github.com/ega4432/lara-docker
docker docker-compose github-actions lara-docker laravel laravel-environment mysql nginx php
Last synced: 9 days ago
JSON representation
:whale: Build the docker containers for Laravel local environment
- Host: GitHub
- URL: https://github.com/ega4432/lara-docker
- Owner: ega4432
- Created: 2019-12-03T13:07:57.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-01T12:48:26.000Z (almost 5 years ago)
- Last Synced: 2024-11-30T18:50:56.982Z (2 months ago)
- Topics: docker, docker-compose, github-actions, lara-docker, laravel, laravel-environment, mysql, nginx, php
- Language: Dockerfile
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lara-docker
![Docker Image CI](https://github.com/yossiee/lara-docker/workflows/Docker%20Image%20CI/badge.svg)
## Overview
This is a repository for building Laravel environment with docker (docker-compose).
The base container image of the software used and its version are as follows.| Software | base container image |
| :---: | :---: |
| php | [7.3-fpm-alpine](https://hub.docker.com/_/php) |
| mysql | [8.0](https://hub.docker.com/_/mysql) |
| nginx | [1.17-alpine](https://hub.docker.com/_/nginx) |
| redis | [5.0-alpine](https://hub.docker.com/_/redis) |
| node | [13.10-alpine](https://hub.docker.com/_/node) |## Setup
### Requirements```
❯ docker -v
Docker version 19.03.5, build 633a0ea❯ docker-compose -v
docker-compose version 1.24.1, build 4667896b
```### Build and Up
```
❯ docker-compose build
❯ docker-compose up -d
```or
```
❯ docker-compose up -d --build
```### Excute command
```
❯ docker-compose exec app [ service name ] ash [ command ( ex: php -v ) ]
```### Stop and Remove containers
```
❯ docker-compose down
```## Install Laravel
```
❯ docker-compose exec app ash
/work # composer create-project --prefer-dist "laravel/laravel=6.0.*" ./work # php artisan -V
Laravel Framework 6.6.1
```## Supplements
### Connect to MySQL```
$ docker-compose exec db bash -c 'mysql -uroot -p${MYSQL_PASSWORD} ${MYSQL_DATABASE}'
```