Last active
April 8, 2021 06:57
-
-
Save karllhughes/35a093473663175f774072858f7d1a9c to your computer and use it in GitHub Desktop.
laravel php docker compose file
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
version: "2" | |
services: | |
web: | |
image: karllhughes/php-fpm-mysql:latest | |
restart: always | |
links: | |
- database | |
- redis | |
env_file: | |
- .env | |
volumes: | |
- ./:/var/www/html:cached | |
worker: | |
image: karllhughes/php-fpm-mysql:latest | |
restart: always | |
links: | |
- database | |
- redis | |
env_file: | |
- .env | |
volumes: | |
- ./:/var/www/html:cached | |
command: php artisan queue:work --tries=3 --sleep=10 | |
database: | |
image: mariadb | |
restart: always | |
environment: | |
- MYSQL_ALLOW_EMPTY_PASSWORD=1 | |
volumes: | |
- .data/:/var/lib/mysql | |
ports: | |
- "33060:3306" | |
nginx: | |
image: tutum/nginx:latest | |
restart: always | |
ports: | |
- "47000:8000" | |
links: | |
- web | |
volumes: | |
- ./nginx:/etc/nginx/sites-enabled | |
redis: | |
image: redis:alpine | |
restart: always |
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 8000; | |
server_name localhost; | |
root /var/www/html/public; | |
index index.html index.htm index.php; | |
charset utf-8; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} | |
location ~ \.php$ { | |
fastcgi_buffers 16 16k; | |
fastcgi_buffer_size 32k; | |
fastcgi_pass web:9000; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $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