diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml new file mode 100644 index 0000000..5c06cc8 --- /dev/null +++ b/docker/docker-compose.yml @@ -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 + +#---------------------------------------------------------- diff --git a/docker/settings/nginx/default b/docker/settings/nginx/default new file mode 100644 index 0000000..9f573c4 --- /dev/null +++ b/docker/settings/nginx/default @@ -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; + } +}