Skip to content

Instantly share code, notes, and snippets.

@paulredmond
Created September 18, 2017 05:13
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save paulredmond/4c16f4308a8a1a1516cea083437d789f to your computer and use it in GitHub Desktop.
Save paulredmond/4c16f4308a8a1a1516cea083437d789f to your computer and use it in GitHub Desktop.
A Docker Compose file for an example Laravel project
version: '3'
services:
app:
build:
context: .
dockerfile: .docker/Dockerfile
image: laravel-docker
ports:
- 8080:80
volumes:
- .:/srv/app
links:
- mysql
- redis
environment:
DB_HOST: mysql
DB_DATABASE: laravel_docker
DB_USERNAME: app
DB_PASSWORD: password
REDIS_HOST: redis
SESSION_DRIVER: redis
CACHE_DRIVER: redis
mysql:
image: mysql:5.7
ports:
- 13306:3306
environment:
MYSQL_DATABASE: laravel_docker
MYSQL_USER: app
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: password
redis:
image: redis:4.0-alpine
ports:
- 16379:6379
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment