Created
January 27, 2021 03:10
-
-
Save vs0uz4/43c2cb8d2bfdcb77c19462da8458a4b6 to your computer and use it in GitHub Desktop.
Gist - Docker Compose Scritp for Laravel 8.0 (MariaDB, Redis, Memcached and Mailhog)
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
# For more information: https://laravel.com/docs/sail | |
version: '3' | |
volumes: | |
sailredis: | |
driver: local | |
sailmariadb: | |
driver: local | |
services: | |
laravel.test: | |
build: | |
context: ./vendor/laravel/sail/runtimes/8.0 | |
dockerfile: Dockerfile | |
args: | |
WWWGROUP: '${WWWGROUP}' | |
image: sail-8.0/app | |
ports: | |
- '${APP_PORT:-80}:80' | |
environment: | |
WWWUSER: '${WWWUSER}' | |
LARAVEL_SAIL: 1 | |
volumes: | |
- .:/var/www/html | |
networks: | |
- sail | |
depends_on: | |
- mariadb | |
- redis | |
- mailhog | |
mariadb: | |
image: mariadb:latest | |
restart: always | |
ports: | |
- '${MARIADB_FORWARD_PORT:-3306}:3306' | |
environment: | |
MYSQL_ROOT_PASSWORD: '${MARIADB_ROOT_PASSWORD}' | |
MYSQL_USER: '${MARIADB_DB_USERNAME}' | |
MYSQL_PASSWORD: '${MARIADB_DB_PASSWORD}' | |
MYSQL_DATABASE: '${MARIADB_DB_DATABASE}' | |
volumes: | |
- sailmariadb:/var/lib/mysql | |
networks: | |
- sail | |
redis: | |
image: redis:alpine | |
ports: | |
- '${REDIS_FORWARD_PORT:-6379}:6379' | |
volumes: | |
- sailredis:/data | |
networks: | |
- sail | |
# memcached: | |
# image: memcached:alpine | |
# ports: | |
# - 11211:11211 | |
# networks: | |
# - sail | |
mailhog: | |
image: mailhog/mailhog:latest | |
ports: | |
- 1025:1025 | |
- 8025:8025 | |
networks: | |
- sail | |
networks: | |
sail: | |
driver: bridge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment