Configuring docker compose.yml - steve-mt/laravel-docker GitHub Wiki
There is a lot you can edit regarding the docker-compose.yml, lets brake it down to its own componenet
web
web:
image: steveazz/nginx # The name of the image it is going to use.
ports:
- "127.0.0.1:8080:80" # All of the port forwarding.
volumes:
- ./:/var/www # Map the current directory to /var/www so that ngix vhost can load the page.
- ./docker-config/vhost.conf:/etc/nginx/sites-enabled/vhost.conf # Map the vhost.conf to site-enabled for nginx.
links:
- php
Some things that you can change is the port forwaring to what ever pleases you as long it maps to port 80, the reason for this is because nginx is listing and port 80.
db
db:
image: sameersbn/mysql
volumes:
- /var/lib/mysql
environment:
- DB_NAME=laravel # Database created by default.
- DB_USER=laravel # User for login credentials.
- DB_PASS=laravel # Password for login credentials.
You can change any of them to what ever pleases you.
php
php:
image: nmcteam/php56
volumes:
- ./docker-config/php-fpm.conf:/etc/php5/fpm/php-fpm.conf # Map config file for php-fpm
- ./:/var/www # Map current directory to /var/www
links:
- db
Nothing much you can change here except the config file location for php-fpm and directory structure.
laravel-commands
laravel-commands:
image: steveazz/laravel-commands
volumes:
- ./:/var/www # Map current directory to /var/www
links:
- db
All you can change here is where the and which directory is mounted on the docker container.
gulp
gulp:
image: steveazz/gulp
volumes:
- ./:/var/www # Map current directory to /var/www
Change the mapping of the directory on the container.