Last active
July 12, 2019 09:05
-
-
Save philippsander/a684e1362e9002da2f14198cb22ac5fc to your computer and use it in GitHub Desktop.
based on files used in video https://www.youtube.com/watch?v=YazmkZszq5c&t=624s
This file contains hidden or 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
mysql: | |
image: mysql | |
container_name: database | |
ports: | |
- 3306:3306 | |
environment: | |
MYSQL_DATABASE: laravel | |
MYSQL_ROOT_PASSWORD: 123456 | |
php: | |
image: php:fpm-alpine | |
container_name: php | |
volumes: | |
- .:/var/www/laravel | |
entrypoint: | |
- php-fpm | |
nginx: | |
image: nginx:alpine | |
container_name: nginx | |
volumes_from: | |
- php | |
volumes: | |
- ./build/nginx.conf:/etc/nginx/conf.d/default.conf | |
links: | |
- php | |
ports: | |
- 8080:80 |
This file contains hidden or 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; | |
root /var/www/laravel/public; | |
index index.php index.html index.htm; | |
server_name laravel.dev; | |
location / { | |
sendfile off; | |
try_files $uri $uri/ /index.php?$query_string; | |
} | |
location ~ \.php$ { | |
try_files $uri /index.php =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass php:9000; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPTFILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
uhm... that video is using old docker syntax ... you`d better catch up the new syntax before it becomes too complicated to understand. they constantly add new stuff...