Created
April 26, 2017 15:24
-
-
Save jabberdog/af78d2005dc0c55d2be770e5a3e53c98 to your computer and use it in GitHub Desktop.
LEMP Stack for Docker (+ phpMyAdmin)
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 { | |
listen 80; | |
# this path MUST be exactly as docker-composer.fpm.volumes, | |
# even if it doesn't exist in this dock. | |
root /user/share/nginx/html; | |
index index.php index.html index.html; | |
server_name 192.168.99.100; | |
location / { | |
try_files $uri /index.php$is_args$args; | |
} | |
location ~ \.php$ { | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass phpfpm:9000; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
} |
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
nginx: | |
image: tutum/nginx | |
ports: | |
- "80:80" | |
links: | |
- phpfpm | |
volumes: | |
- ./nginx/default:/etc/nginx/sites-available/default | |
- ./nginx/default:/etc/nginx/sites-enabled/default | |
- ./logs/nginx-error.log:/var/log/nginx/error.log | |
- ./logs/nginx-access.log:/var/log/nginx/access.log | |
phpfpm: | |
image: php:fpm | |
ports: | |
- "9000:9000" | |
volumes: | |
- ./public:/user/share/nginx/html | |
mysql: | |
image: mariadb | |
environment: | |
MYSQL_ROOT_PASSWORD: admin | |
phpmyadmin: | |
image: phpmyadmin/phpmyadmin | |
restart: always | |
links: | |
- mysql | |
ports: | |
- 8183:80 | |
environment: | |
MYSQL_USERNAME: admin | |
MYSQL_ROOT_PASSWORD: admin | |
PMA_ARBITRARY: 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment