add the docker compose file and the settings
This commit is contained in:
parent
a5954594ad
commit
7285e33429
54
docker/docker-compose.yml
Normal file
54
docker/docker-compose.yml
Normal file
@ -0,0 +1,54 @@
|
||||
# PHP + NGINX Container #----------------------------------
|
||||
phpn-ginx:
|
||||
image: mahmoudz/lara-phpnginx
|
||||
container_name: php-nginx
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./settings/nginx:/etc/nginx/sites-available
|
||||
- ../laravel:/var/www
|
||||
- ./logs/nginx:/var/log/nginx
|
||||
links:
|
||||
- mysql
|
||||
- redis
|
||||
- beanstalkd
|
||||
privileged: true
|
||||
|
||||
# MySQL Container #----------------------------------------
|
||||
mysql:
|
||||
image: mahmoudz/lara-mysql
|
||||
container_name: mysql
|
||||
ports:
|
||||
- "3306:3306"
|
||||
volumes_from:
|
||||
- mysql-data
|
||||
environment:
|
||||
MYSQL_DATABASE: laravel-database
|
||||
MYSQL_USER: root
|
||||
MYSQL_PASSWORD: pass
|
||||
privileged: true
|
||||
|
||||
# MySQL Data Volume Container #----------------------------
|
||||
mysql-data:
|
||||
image: mahmoudz/lara-data
|
||||
container_name: mysql-data
|
||||
volumes:
|
||||
- /var/lib/mysql
|
||||
|
||||
# Redis Container #----------------------------------------
|
||||
redis:
|
||||
image: mahmoudz/lara-redis
|
||||
container_name: redis
|
||||
ports:
|
||||
- "6379:6379"
|
||||
privileged: true
|
||||
|
||||
# Beanstalkd Container #-----------------------------------
|
||||
beanstalkd:
|
||||
image: mahmoudz/lara-beanstalkd
|
||||
container_name: beanstalkd
|
||||
ports:
|
||||
- "11300:11300"
|
||||
privileged: true
|
||||
|
||||
#----------------------------------------------------------
|
25
docker/settings/nginx/default
Normal file
25
docker/settings/nginx/default
Normal file
@ -0,0 +1,25 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server ipv6only=on;
|
||||
|
||||
root /var/www/public;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
server_name localdock localdock.dev;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php$is_args$args;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri /index.php =404;
|
||||
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user