-
-
Save UnderDogg/244ab40a8a8645a933f5094bc23dbedb to your computer and use it in GitHub Desktop.
A Docker Compose file for an example Laravel project
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
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