https://github.com/yano3nora/lampdock
The Docker boilerplate for LAMP environment.
https://github.com/yano3nora/lampdock
apache docker docker-compose mysql php
Last synced: 2 months ago
JSON representation
The Docker boilerplate for LAMP environment.
- Host: GitHub
- URL: https://github.com/yano3nora/lampdock
- Owner: yano3nora
- Created: 2019-06-04T04:33:20.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-02T07:29:08.000Z (almost 7 years ago)
- Last Synced: 2025-07-05T09:43:08.187Z (about 1 year ago)
- Topics: apache, docker, docker-compose, mysql, php
- Language: Dockerfile
- Size: 29.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
lampdock.
===============
> posted: 2019.06.04
> author: hyano@ampware.jp
## OVERVIEW
The Docker boilerplate for LAMP environment.
### Composition.
- php 7.2.x
- apache 2.4.x
- mysql 5.7.x
### DEPLOYMENT
```sh
# Set .env file.
$ cp .env.development .env
# Build containers.
$ docker-compose build
$ docker-compose run --rm db mysqld --initialize # Only at first build.
$ docker-compose up
# Login to app container.
$ docker-compose exec web bash
# e.g. Install PHP framework that like the Laravel ...
app> composer create-project --prefer-dist laravel/laravel laravel
app> cd laravel
app> php artisan key:generate --show
> base64:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
app> exit
# Fix web root setting by env.
$ vi .env
> # WEB_ROOT=/var/www/html
> WEB_ROOT=/var/www/laravel/public
# Fix framework setting by env.
#
# ## NOTE ##
# laravel/.env is ignored,
# if there is a system environment variable of the same name.
# ##########
#
$ vi .env
> APP_KEY=base64:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> DB_HOST=db
# Rebuild containers.
$ docker-compose down
$ docker-compose build
$ docker-compose up
```