File tree Expand file tree Collapse file tree 4 files changed +53
-4
lines changed Expand file tree Collapse file tree 4 files changed +53
-4
lines changed Original file line number Diff line number Diff line change 6
6
APP_PATH=./..
7
7
8
8
# Nginx
9
- NGINX_HOST = symfony2 .docker
9
+ NGINX_HOST=laravel .docker
10
10
11
11
# PHP
12
12
PHP_VERSION=7.2
Original file line number Diff line number Diff line change 1
- Inspired from: https://github.com/nanoninja/docker-nginx-php-mysql
1
+ Inspired from: https://github.com/nanoninja/docker-nginx-php-mysql
2
+ ## How to use
3
+ - Copy environment file ` .env.dist ` to ` .env `
4
+ - Edit parameters in the ` .env ` file: ` NGINX_HOST `
5
+ - Choose the Nginx configuration will be use in ` docker-compose.yml ` file
6
+ - Make sure the ports using in the docker-compose will be free
7
+ - Run ` docker-compose up -d `
8
+ ## Issues
9
+ Message: ` Error starting userland proxy `
10
+ OS: Windows 10
11
+ Fix: Restart Docker
12
+ Fix #2 : Uncheck Fast startup option
13
+ Url: https://github.com/docker/for-win/issues/573
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ services:
5
5
volumes :
6
6
- " ./etc/ssl:/etc/ssl"
7
7
- " ${APP_PATH}:/var/www/html"
8
- - " ./etc/nginx/symfony2 .conf:/etc/nginx/conf.d/default.template"
8
+ - " ./etc/nginx/laravel .conf:/etc/nginx/conf.d/default.template"
9
9
ports :
10
10
- " 8010:80"
11
11
- " 3010:443"
@@ -25,7 +25,6 @@ services:
25
25
- " ${APP_PATH}:/var/www/html"
26
26
depends_on :
27
27
- mysqldb
28
- command : /bin/bash -c "composer install"
29
28
mysqldb :
30
29
image : mysql:${MYSQL_VERSION}
31
30
container_name : ${MYSQL_HOST}
Original file line number Diff line number Diff line change
1
+ server {
2
+ listen 80;
3
+ server_name ${NGINX_HOST};
4
+ root /var/www/html/public;
5
+
6
+ index index.html index.htm index.php;
7
+
8
+ charset utf-8;
9
+
10
+ location / {
11
+ try_files $uri $uri/ /index.php$is_args$args;
12
+ }
13
+
14
+ location = /favicon.ico { access_log off; log_not_found off; }
15
+ location = /robots.txt { access_log off; log_not_found off; }
16
+
17
+ access_log off;
18
+ error_log /var/log/nginx/error.log error;
19
+
20
+ sendfile off;
21
+
22
+ client_max_body_size 100m;
23
+
24
+ location ~ \.php$ {
25
+ fastcgi_split_path_info ^(.+\.php)(/.+)$;
26
+ fastcgi_pass php:9000;
27
+ fastcgi_index index.php;
28
+ include fastcgi_params;
29
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
30
+ fastcgi_intercept_errors off;
31
+ fastcgi_buffer_size 16k;
32
+ fastcgi_buffers 4 16k;
33
+ }
34
+
35
+ location ~ /\.ht {
36
+ deny all;
37
+ }
38
+ }
You can’t perform that action at this time.
0 commit comments