Created
December 20, 2016 11:27
-
-
Save lucassmacedo/4af2017d215e543817440251c22547c3 to your computer and use it in GitHub Desktop.
Laravel + Pgsql + Mongo + Redis
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 | |
#### | |
# v2 syntax | |
version: '2' | |
# Named volumes | |
volumes: | |
# Postgres Data | |
sandbox-postgres-data: | |
driver: local | |
# MySQL Data | |
sandbox-mysql-data: | |
driver: local | |
# Redis Data | |
sandbox-redis-data: | |
driver: local | |
services: | |
# Postgres (9.5) | |
postgres: | |
image: ambientum/postgres:9.6 | |
container_name: sandbox-postgres | |
volumes: | |
- sandbox-postgres-data:/var/lib/postgresql/data | |
ports: | |
- "5432:5432" | |
environment: | |
- POSTGRES_PASSWORD=sandbox | |
- POSTGRES_DB=sandbox | |
- POSTGRES_USER=sandbox | |
# 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: | |
- postgres | |
- mysql | |
- cache | |
- mongo | |
# Laravel Queues | |
queue: | |
image: ambientum/php:7.0 | |
container_name: sandbox-queue | |
command: php artisan queue:listen | |
volumes: | |
- .:/var/www/app | |
links: | |
- mysql | |
- cache | |
mongodata: | |
image: mongo:3.0.4 | |
volumes: | |
- /data/db1 | |
command: --break-mongo | |
mongo: | |
image: mongo:3.0.4 | |
container_name: sandbox-mongo | |
volumes_from: | |
- mongodata | |
ports: | |
- "27017:27017" | |
command: --smallfiles --rest --auth |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment