File tree Expand file tree Collapse file tree 5 files changed +76
-0
lines changed Expand file tree Collapse file tree 5 files changed +76
-0
lines changed Original file line number Diff line number Diff line change 1+ .DS_Store
2+ .idea
Original file line number Diff line number Diff line change 1+ FROM php:7.2-fpm-alpine
2+
3+ RUN docker-php-ext-install pdo pdo_mysql
Original file line number Diff line number Diff line change 1+ version : ' 3'
2+
3+ networks :
4+ laravel :
5+
6+ services :
7+ nginx :
8+ image : nginx:stable-alpine
9+ container_name : nginx
10+ ports :
11+ - " 8080:80"
12+ volumes :
13+ - ./src:/var/www
14+ - ./nginx/default.conf:/etc/nginx/conf.d/default.conf
15+ depends_on :
16+ - php
17+ - mysql
18+ networks :
19+ - laravel
20+
21+ mysql :
22+ image : mysql:5.7.22
23+ container_name : mysql
24+ restart : unless-stopped
25+ tty : true
26+ ports :
27+ - " 3306:3306"
28+ environment :
29+ MYSQL_DATABASE : homestead
30+ MYSQL_USER : homestead
31+ MYSQL_PASSWORD : secret
32+ MYSQL_ROOT_PASSWORD : secret
33+ SERVICE_TAGS : dev
34+ SERVICE_NAME : mysql
35+ networks :
36+ - laravel
37+
38+ php :
39+ build :
40+ context : .
41+ dockerfile : Dockerfile
42+ container_name : php
43+ volumes :
44+ - ./src:/var/www
45+ ports :
46+ - " 9000:9000"
47+ networks :
48+ - laravel
Original file line number Diff line number Diff line change 1+ server {
2+ listen 80;
3+ index index.php index.html;
4+ server_name localhost;
5+ error_log /var/log/nginx/error.log;
6+ access_log /var/log/nginx/access.log;
7+ root /var/www/public;
8+
9+ location / {
10+ try_files $uri $uri/ /index.php?$query_string;
11+ }
12+
13+ location ~ \.php$ {
14+ try_files $uri =404;
15+ fastcgi_split_path_info ^(.+\.php)(/.+)$;
16+ fastcgi_pass php:9000;
17+ fastcgi_index index.php;
18+ include fastcgi_params;
19+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
20+ fastcgi_param PATH_INFO $fastcgi_path_info;
21+ }
22+ }
Original file line number Diff line number Diff line change 1+ # Your Laravel app goes in here
You can’t perform that action at this time.
0 commit comments