Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # docker-compose.yml
- version: '2'
- services:
- # The Application
- app:
- build:
- context: ./
- dockerfile: app.dockerfile
- working_dir: /var/www
- volumes:
- - ./:/var/www
- environment:
- - "DB_PORT=3306"
- - "DB_HOST=database"
- # The Web Server
- web:
- build:
- context: ./
- dockerfile: web.dockerfile
- working_dir: /var/www
- volumes_from:
- - app
- ports:
- - 8080:80
- # The Database
- database:
- image: mysql:5.7
- volumes:
- - dbdata:/var/lib/mysql
- environment:
- - "MYSQL_DATABASE=homestead"
- - "MYSQL_USER=homestead"
- - "MYSQL_PASSWORD=secret"
- - "MYSQL_ROOT_PASSWORD=secret"
- ports:
- - "33061:3306"
- volumes:
- dbdata:
- FROM nginx:latest
- ADD vhost.conf /nginx/conf.d/default.conf
- # Añadido por mi a ver si enruta bien
- WORKDIR /var/www
- server {
- listen 80;
- index index.php index.html;
- root /var/www/public;
- location / {
- try_files $uri /index.php?$args;
- }
- location ~ .php$ {
- fastcig_split_path_info ^(.+.php)(/.+)$;
- fastcgi_pass app:9000;
- fastcgi_index index.php;
- include fastcgi_params;
- fastcgi_parm SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param PATH_INFO $fastcgi_path_info;
- }
- }
- FROM php:7.0.15-fpm
- RUN apt-get update && apt-get install -y libmcrypt-dev
- mysql-client libmagickwand-dev --no-install-recommends
- && pecl install imagick
- && docker-php-ext-enable imagick
- && docker-php-ext-install mcrypt pdo_mysql
- networks:
- appnet:
- driver: bridge
- networks:
- - appnet
Add Comment
Please, Sign In to add comment