Created
December 7, 2022 20:33
-
-
Save Shelob9/5acf87771a041a6b4f91355e6d1cb6f4 to your computer and use it in GitHub Desktop.
Add new environment variable, from .env file, to Laravel sail, in docker-compose file https://laravel.com/docs/9.x/sail
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
laravel.test: | |
build: | |
context: ./vendor/laravel/sail/runtimes/8.1 | |
dockerfile: Dockerfile | |
args: | |
WWWGROUP: '${WWWGROUP}' | |
image: sail-8.1/app | |
extra_hosts: | |
- 'host.docker.internal:host-gateway' | |
ports: | |
- '${APP_PORT:-80}:80' | |
- '${VITE_PORT:-5173}:${VITE_PORT:-5173}' | |
environment: | |
# New variable | |
FLARE_KEY: '${FLARE_KEY}' | |
WWWUSER: '${WWWUSER}' | |
LARAVEL_SAIL: 1 | |
# These last two have defaults | |
XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}' | |
XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}' | |
volumes: | |
- '.:/var/www/html' | |
networks: | |
- sail | |
depends_on: | |
- mysql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment