Skip to content

Commit

Permalink
v 0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
desure85@gmail.com authored and desure85@gmail.com committed May 9, 2017
1 parent 215778c commit 821a871
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@
!/project/dir_to_project
!/project
!/docker/php/build/Dockerfile
!/docker/php/ini/zcustom.ini
!/docker/php/ini/
7 changes: 4 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@ nginx:
links:
- php
volumes:
- ./project:/www #папка с проектом
- ./main:/www #папка с проектом
- ./docker/nginx/conf.d:/etc/nginx/conf.d # - advanced
#- ./docker/nginx/conf.d:/etc/nginx/conf.d-basic # - basic
ports:
- 80:80
- 8080:8080
- 443:443
php:
build: docker/php/build
links:
- mysql
volumes:
- ./project:/www
- ./projectnew:/www2
- ./main:/www #папка с проектом
- ./docker/php/php-fpm.conf:/usr/local/etc/php-fpm.conf
- ./docker/php/ini/zcustom.ini:/usr/local/etc/php/conf.d/zcustom.ini
working_dir: /www/

mysql:
Expand Down
36 changes: 36 additions & 0 deletions docker/nginx/conf.d/advanced.conf
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,42 @@ server {
#}
#error_page 404 /404.html;

location ~ /\.(ht|svn|git) {
deny all;
}
}
server {
charset utf-8;
client_max_body_size 128M;

listen 8080; ## listen for ipv4
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6

server_name mysite.local;
index index.php;

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

location / {
root /www/backend/web;
# Redirect everything that isn't a real file to index.php
try_files $uri $uri/ /index.php?$args;

location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
fastcgi_pass php:9000;
#fastcgi_pass unix:/var/run/php5-fpm.sock;
#try_files $uri =404;
}
}
# uncomment to avoid processing of calls to non-existing static files by Yii
#location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
# try_files $uri =404;
#}
#error_page 404 /404.html;

location ~ /\.(ht|svn|git) {
deny all;
}
Expand Down
5 changes: 5 additions & 0 deletions docker/php/ini/zcustom.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
; Maximum allowed size for uploaded files.
upload_max_filesize = 8M

; Must be greater than or equal to upload_max_filesize
post_max_size = 8M

0 comments on commit 821a871

Please sign in to comment.