Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
L
laravel-startup
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Peter Cheng
laravel-startup
Commits
06445792
Commit
06445792
authored
Sep 19, 2018
by
Peter Cheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
設置完成
parent
736074e9
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
126 additions
and
0 deletions
+126
-0
README.md
README.md
+14
-0
docker-compose.yml
dev_env/docker-compose.yml
+41
-0
default.conf
dev_env/nginx/conf.d/default.conf
+48
-0
access.log
dev_env/nginx/logs/access.log
+0
-0
error.log
dev_env/nginx/logs/error.log
+0
-0
startup.access.log
dev_env/nginx/logs/startup.access.log
+0
-0
startup.error.log
dev_env/nginx/logs/startup.error.log
+0
-0
Dockerfile
dev_env/php/build/Dockerfile
+23
-0
No files found.
README.md
View file @
06445792
# laravel-startup
# laravel-startup
Nginx + PHP 7.0 + MySQL + Laravel 環境快速生成器
Nginx + PHP 7.0 + MySQL + Laravel 環境快速生成器
## 使用方式
1.
進入 dev_env 資料夾中
2.
下docker-compose up -d 啟動 docker 環境
## 資料庫預設帳密
帳號: root
密碼: 1qazse4rfvgy7
## composer 使用方式
```
php ~/composer.phar
```
\ No newline at end of file
dev_env/docker-compose.yml
0 → 100755
View file @
06445792
version
:
'
2'
services
:
web
:
image
:
'
nginx:alpine'
container_name
:
'
startup_web'
networks
:
-
startup-networks
ports
:
-
'
0.0.0.0:80:80'
volumes
:
-
'
./nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf'
-
'
./nginx/logs:/var/log/nginx'
-
'
../:/var/www/html'
restart
:
always
depends_on
:
-
php
-
database
php
:
build
:
'
./php/build'
image
:
'
startup-php'
container_name
:
'
startup_php'
networks
:
-
startup-networks
restart
:
always
volumes
:
-
'
../:/var/www/html'
database
:
image
:
'
mysql:5.7'
container_name
:
'
startup_database'
networks
:
-
startup-networks
ports
:
-
'
0.0.0.0:3306:3306'
volumes
:
-
'
./mysql/datadir:/var/lib/mysql'
restart
:
always
environment
:
MYSQL_ROOT_PASSWORD
:
1qazse4rfvgy7
networks
:
startup-networks
:
driver
:
bridge
\ No newline at end of file
dev_env/nginx/conf.d/default.conf
0 → 100755
View file @
06445792
server
{
listen
80
;
server_name
startup
;
root
/
var
/
www
/
html
/
web
/
public
;
index
index
.
html
index
.
htm
index
.
php
;
#charset koi8-r;
access_log
/
var
/
log
/
nginx
/
startup
.
access
.
log
main
;
error_log
/
var
/
log
/
nginx
/
startup
.
error
.
log
;
location
/ {
try_files
$
uri
$
uri
/ /
index
.
php
?$
query_string
;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page
500
502
503
504
/
50
x
.
html
;
location
= /
50
x
.
html
{
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location
~ \.
php
$ {
fastcgi_param
SCRIPT_FILENAME
$
document_root
$
fastcgi_script_name
;
fastcgi_split_path_info
^(.+\.
php
)(/.+)$;
fastcgi_index
index
.
php
;
include
fastcgi_params
;
fastcgi_pass
startup_php
:
9000
;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
dev_env/nginx/logs/access.log
0 → 100755
View file @
06445792
dev_env/nginx/logs/error.log
0 → 100755
View file @
06445792
dev_env/nginx/logs/startup.access.log
0 → 100755
View file @
06445792
dev_env/nginx/logs/startup.error.log
0 → 100755
View file @
06445792
dev_env/php/build/Dockerfile
0 → 100755
View file @
06445792
FROM
php:7.0-fpm-alpine3.7
RUN
apk update
RUN
apk add libpng-dev freetype-dev libjpeg-turbo-dev jpeg-dev
RUN
docker-php-ext-install zip pdo_mysql
RUN
docker-php-ext-configure gd
--with-freetype-dir
=
/usr/include/
--with-png-dir
=
/usr/include
--with-jpeg-dir
=
/usr/include
RUN
docker-php-ext-install gd
RUN
php
-r
"copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN
php
-r
"if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
RUN
php composer-setup.php
RUN
php
-r
"unlink('composer-setup.php');"
RUN
mv
composer.phar ~/
WORKDIR
/var/www/html
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment