Created
December 30, 2018 03:30
-
-
Save duwaljyoti/2e30f5c826a7b58ac1ca4c5af8117c4f to your computer and use it in GitHub Desktop.
This file contains 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 | |
# specify a path on the host machine to map the | |
volumes: | |
- .:/srv/app | |
# linking services so that our application can communicate with these servcies. | |
links: | |
- mysql | |
- redis | |
# - phpmyadmin | |
environment: | |
DB_HOST: mysql | |
DB_DATABASE: laravel_docker | |
DB_USERNAME: app | |
DB_PASSWORD: password | |
REDIS_HOST: redis | |
SESSION_DRIVER: redis | |
CACHE_DRIVER: redis | |
# db: | |
# image: mysql:5.7 | |
# ports: | |
# - 3307:3306 | |
# volumes: | |
# - dbdata:/var/lib/db | |
# environment: | |
# MYSQL_DATABASE: laravel_docker | |
# MYSQL_USER: app | |
# MYSQL_PASSWORD: password | |
# MYSQL_ROOT_PASSWORD: password | |
mysql: | |
image: mysql:5.7 | |
ports: | |
- 13306:3306 | |
environment: | |
MYSQL_DATABASE: laravel_docker | |
MYSQL_USER: app | |
MYSQL_PASSWORD: password | |
MYSQL_ROOT_PASSWORD: password | |
volumes: | |
# without DATA_SAVE_PATH | |
- mysql:/var/lib/mysql | |
redis: | |
image: redis:5.0-alpine | |
ports: | |
- 16379:6379 | |
# phpmyadmin: | |
# image: phpmyadmin/phpmyadmin | |
# depends_on: | |
# - mysql | |
# ports: | |
# - 9191:80 | |
# phpmyadmin: | |
# image: phpmyadmin/phpmyadmin | |
# depends_on: | |
# - db | |
# ports: | |
# - "9192:80" | |
# volumes: | |
# dbdata: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment