Created
September 8, 2016 23:32
-
-
Save jjcodes78/014820d03211b2e98f819745379169aa to your computer and use it in GitHub Desktop.
Docker compose file to Laravel Projects
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
#### | |
# ATENTION: | |
# Replace all occurences of sandbox with your project's name | |
# Credits: http://github.com/codecasts/ambientum | |
#### | |
# v2 sintax | |
version: '2' | |
# Named volumes | |
volumes: | |
# MySQL Data | |
sandbox-mysql-data: | |
driver: local | |
# Redis Data | |
sandbox-redis-data: | |
driver: local | |
services: | |
# MySQL (5.7) | |
mysql: | |
image: ambientum/mysql:5.7 | |
container_name: sandbox-mysql | |
volumes: | |
- sandbox-mysql-data:/var/lib/mysql | |
ports: | |
- "3306:3306" | |
environment: | |
- MYSQL_ROOT_PASSWORD=sandbox | |
- MYSQL_DATABASE=sandbox | |
- MYSQL_USER=sandbox | |
- MYSQL_PASSWORD=sandbox | |
# Redis | |
cache: | |
image: ambientum/redis:3.2 | |
container_name: sandbox-redis | |
command: --appendonly yes | |
volumes: | |
- sandbox-redis-data:/data | |
ports: | |
- "6379:6379" | |
# PHP (with Caddy) | |
app: | |
image: ambientum/php:7.0-caddy | |
container_name: sandbox-app | |
volumes: | |
- .:/var/www/app | |
ports: | |
- "80:8080" | |
links: | |
- mysql | |
- cache | |
# Laravel Queues | |
queue: | |
image: ambientum/php:7.0 | |
container_name: sandbox-queue | |
command: php artisan queue:listen | |
volumes: | |
- .:/var/www/app | |
links: | |
- mysql | |
- cache |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment