Last active
August 15, 2016 11:30
-
-
Save haiderfaraz/e0ee16527c11cb430c4725715fc18952 to your computer and use it in GitHub Desktop.
Docker configuration files for Nginx + PHP-FPM7 set-up
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
index index.php index.html; | |
server_name your_server_name; | |
error_log /var/log/nginx/error.log; | |
access_log /var/log/nginx/access.log; | |
root /code; | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass php:9000; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param PATH_INFO $fastcgi_path_info; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
web: | |
image: nginx:latest | |
ports: | |
- "80:80" | |
volumes: | |
- ./site.conf:/etc/nginx/conf.d/default.conf | |
- ./code:/code | |
links: | |
- php | |
php: | |
image: php:7-fpm | |
volumes: | |
- ./code:/code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment