Skip to content

Commit e0362b6

Browse files
committed
Initial commit
1 parent 69a032a commit e0362b6

File tree

5 files changed

+76
-0
lines changed

5 files changed

+76
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.DS_Store
2+
.idea

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM php:7.2-fpm-alpine
2+
3+
RUN docker-php-ext-install pdo pdo_mysql

docker-compose.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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

nginx/default.conf

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
}

src/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Your Laravel app goes in here

0 commit comments

Comments
 (0)